[FFmpeg-cvslog] r18480 - trunk/libavformat/utils.c

bcoudurier subversion
Mon Apr 13 05:32:03 CEST 2009


Author: bcoudurier
Date: Mon Apr 13 05:32:02 2009
New Revision: 18480

Log:
reindent

Modified:
   trunk/libavformat/utils.c

Modified: trunk/libavformat/utils.c
==============================================================================
--- trunk/libavformat/utils.c	Mon Apr 13 05:29:19 2009	(r18479)
+++ trunk/libavformat/utils.c	Mon Apr 13 05:32:02 2009	(r18480)
@@ -1848,34 +1848,34 @@ static int try_decode_frame(AVStream *st
     int got_picture, data_size, ret=0;
     AVFrame picture;
 
-  if(!st->codec->codec){
-    codec = avcodec_find_decoder(st->codec->codec_id);
-    if (!codec)
-        return -1;
-    ret = avcodec_open(st->codec, codec);
-    if (ret < 0)
-        return ret;
-  }
+    if(!st->codec->codec){
+        codec = avcodec_find_decoder(st->codec->codec_id);
+        if (!codec)
+            return -1;
+        ret = avcodec_open(st->codec, codec);
+        if (ret < 0)
+            return ret;
+    }
 
-  if(!has_codec_parameters(st->codec)){
-    switch(st->codec->codec_type) {
-    case CODEC_TYPE_VIDEO:
-        ret = avcodec_decode_video2(st->codec, &picture,
-                                    &got_picture, avpkt);
-        break;
-    case CODEC_TYPE_AUDIO:
-        data_size = FFMAX(avpkt->size, AVCODEC_MAX_AUDIO_FRAME_SIZE);
-        samples = av_malloc(data_size);
-        if (!samples)
-            goto fail;
-        ret = avcodec_decode_audio3(st->codec, samples,
-                                    &data_size, avpkt);
-        av_free(samples);
-        break;
-    default:
-        break;
+    if(!has_codec_parameters(st->codec)){
+        switch(st->codec->codec_type) {
+        case CODEC_TYPE_VIDEO:
+            ret = avcodec_decode_video2(st->codec, &picture,
+                                        &got_picture, avpkt);
+            break;
+        case CODEC_TYPE_AUDIO:
+            data_size = FFMAX(avpkt->size, AVCODEC_MAX_AUDIO_FRAME_SIZE);
+            samples = av_malloc(data_size);
+            if (!samples)
+                goto fail;
+            ret = avcodec_decode_audio3(st->codec, samples,
+                                        &data_size, avpkt);
+            av_free(samples);
+            break;
+        default:
+            break;
+        }
     }
-  }
  fail:
     return ret;
 }



More information about the ffmpeg-cvslog mailing list