Commit 9caf6781 authored by Baptiste Coudurier's avatar Baptiste Coudurier

cosmetics, remove useless cases and braces

Originally committed as revision 13456 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 1234da4c
...@@ -238,15 +238,14 @@ static int swf_write_header(AVFormatContext *s) ...@@ -238,15 +238,14 @@ static int swf_write_header(AVFormatContext *s)
is_avm2 = !strcmp("avm2", s->oformat->name); is_avm2 = !strcmp("avm2", s->oformat->name);
put_tag(pb, "FWS"); put_tag(pb, "FWS");
if (is_avm2) { if (is_avm2)
put_byte(pb, 9); put_byte(pb, 9);
} else if (video_enc && video_enc->codec_id == CODEC_ID_VP6F) { else if (video_enc && video_enc->codec_id == CODEC_ID_VP6F)
put_byte(pb, 8); /* version (version 8 and above support VP6 codec) */ put_byte(pb, 8); /* version (version 8 and above support VP6 codec) */
} else if (video_enc && video_enc->codec_id == CODEC_ID_FLV1) { else if (video_enc && video_enc->codec_id == CODEC_ID_FLV1)
put_byte(pb, 6); /* version (version 6 and above support FLV1 codec) */ put_byte(pb, 6); /* version (version 6 and above support FLV1 codec) */
} else { else
put_byte(pb, 4); /* version (should use 4 for mpeg audio support) */ put_byte(pb, 4); /* version (should use 4 for mpeg audio support) */
}
put_le32(pb, DUMMY_FILE_SIZE); /* dummy size put_le32(pb, DUMMY_FILE_SIZE); /* dummy size
(will be patched if not streamed) */ (will be patched if not streamed) */
...@@ -263,9 +262,7 @@ static int swf_write_header(AVFormatContext *s) ...@@ -263,9 +262,7 @@ static int swf_write_header(AVFormatContext *s)
} }
/* define a shape with the jpeg inside */ /* define a shape with the jpeg inside */
if (video_enc && (video_enc->codec_id == CODEC_ID_VP6F || if (video_enc && video_enc->codec_id == CODEC_ID_MJPEG) {
video_enc->codec_id == CODEC_ID_FLV1)) {
} else if (video_enc && video_enc->codec_id == CODEC_ID_MJPEG) {
put_swf_tag(s, TAG_DEFINESHAPE); put_swf_tag(s, TAG_DEFINESHAPE);
put_le16(pb, SHAPE_ID); /* ID of shape */ put_le16(pb, SHAPE_ID); /* ID of shape */
...@@ -353,9 +350,8 @@ static int swf_write_video(AVFormatContext *s, ...@@ -353,9 +350,8 @@ static int swf_write_video(AVFormatContext *s,
ByteIOContext *pb = s->pb; ByteIOContext *pb = s->pb;
/* Flash Player limit */ /* Flash Player limit */
if (swf->swf_frame_number == 16000) { if (swf->swf_frame_number == 16000)
av_log(enc, AV_LOG_INFO, "warning: Flash Player limit of 16000 frames reached\n"); av_log(enc, AV_LOG_INFO, "warning: Flash Player limit of 16000 frames reached\n");
}
if (swf->video_type == CODEC_ID_VP6F || if (swf->video_type == CODEC_ID_VP6F ||
swf->video_type == CODEC_ID_FLV1) { swf->video_type == CODEC_ID_FLV1) {
...@@ -434,8 +430,6 @@ static int swf_write_video(AVFormatContext *s, ...@@ -434,8 +430,6 @@ static int swf_write_video(AVFormatContext *s,
put_le16(pb, 1); /* depth */ put_le16(pb, 1); /* depth */
put_swf_matrix(pb, 20 << FRAC_BITS, 0, 0, 20 << FRAC_BITS, 0, 0); put_swf_matrix(pb, 20 << FRAC_BITS, 0, 0, 20 << FRAC_BITS, 0, 0);
put_swf_end_tag(s); put_swf_end_tag(s);
} else {
/* invalid codec */
} }
swf->swf_frame_number ++; swf->swf_frame_number ++;
...@@ -468,9 +462,8 @@ static int swf_write_audio(AVFormatContext *s, ...@@ -468,9 +462,8 @@ static int swf_write_audio(AVFormatContext *s,
SWFContext *swf = s->priv_data; SWFContext *swf = s->priv_data;
/* Flash Player limit */ /* Flash Player limit */
if (swf->swf_frame_number == 16000) { if (swf->swf_frame_number == 16000)
av_log(enc, AV_LOG_INFO, "warning: Flash Player limit of 16000 frames reached\n"); av_log(enc, AV_LOG_INFO, "warning: Flash Player limit of 16000 frames reached\n");
}
if (swf->audio_in_pos + size >= AUDIO_FIFO_SIZE) { if (swf->audio_in_pos + size >= AUDIO_FIFO_SIZE) {
av_log(s, AV_LOG_ERROR, "audio fifo too small to mux audio essence\n"); av_log(s, AV_LOG_ERROR, "audio fifo too small to mux audio essence\n");
...@@ -482,9 +475,8 @@ static int swf_write_audio(AVFormatContext *s, ...@@ -482,9 +475,8 @@ static int swf_write_audio(AVFormatContext *s,
swf->sound_samples += enc->frame_size; swf->sound_samples += enc->frame_size;
/* if audio only stream make sure we add swf frames */ /* if audio only stream make sure we add swf frames */
if (swf->video_type == 0) { if (swf->video_type == 0)
swf_write_video(s, enc, 0, 0); swf_write_video(s, enc, 0, 0);
}
return 0; return 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment