changeset 3369:026b8ba58408 libavformat

cosmetics, remove useless cases and braces
author bcoudurier
date Tue, 27 May 2008 02:55:34 +0000
parents 4a233106ccd0
children c1736a1cf27b
files swfenc.c
diffstat 1 files changed, 8 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/swfenc.c	Tue May 27 01:26:22 2008 +0000
+++ b/swfenc.c	Tue May 27 02:55:34 2008 +0000
@@ -238,15 +238,14 @@
     is_avm2 = !strcmp("avm2", s->oformat->name);
 
     put_tag(pb, "FWS");
-    if (is_avm2) {
+    if (is_avm2)
         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) */
-    } 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) */
-    } else {
+    else
         put_byte(pb, 4); /* version (should use 4 for mpeg audio support) */
-    }
     put_le32(pb, DUMMY_FILE_SIZE); /* dummy size
                                       (will be patched if not streamed) */
 
@@ -263,9 +262,7 @@
     }
 
     /* define a shape with the jpeg inside */
-    if (video_enc && (video_enc->codec_id == CODEC_ID_VP6F ||
-                       video_enc->codec_id == CODEC_ID_FLV1)) {
-    } else if (video_enc && video_enc->codec_id == CODEC_ID_MJPEG) {
+    if (video_enc && video_enc->codec_id == CODEC_ID_MJPEG) {
         put_swf_tag(s, TAG_DEFINESHAPE);
 
         put_le16(pb, SHAPE_ID); /* ID of shape */
@@ -353,9 +350,8 @@
     ByteIOContext *pb = s->pb;
 
     /* 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");
-    }
 
     if (swf->video_type == CODEC_ID_VP6F ||
         swf->video_type == CODEC_ID_FLV1) {
@@ -434,8 +430,6 @@
         put_le16(pb, 1); /* depth */
         put_swf_matrix(pb, 20 << FRAC_BITS, 0, 0, 20 << FRAC_BITS, 0, 0);
         put_swf_end_tag(s);
-    } else {
-        /* invalid codec */
     }
 
     swf->swf_frame_number ++;
@@ -468,9 +462,8 @@
     SWFContext *swf = s->priv_data;
 
     /* 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");
-    }
 
     if (swf->audio_in_pos + size >= AUDIO_FIFO_SIZE) {
         av_log(s, AV_LOG_ERROR, "audio fifo too small to mux audio essence\n");
@@ -482,9 +475,8 @@
     swf->sound_samples += enc->frame_size;
 
     /* 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);
-    }
 
     return 0;
 }