[FFmpeg-soc] [soc]: r3820 - in dirac/libavcodec: dirac.c diracdec.c

conrad subversion at mplayerhq.hu
Tue Nov 11 09:38:24 CET 2008


Author: conrad
Date: Tue Nov 11 09:38:23 2008
New Revision: 3820

Log:
Move setting the AVCodecContext dimensions to ff_dirac_parse_sequence_header


Modified:
   dirac/libavcodec/dirac.c
   dirac/libavcodec/diracdec.c

Modified: dirac/libavcodec/dirac.c
==============================================================================
--- dirac/libavcodec/dirac.c	(original)
+++ dirac/libavcodec/dirac.c	Tue Nov 11 09:38:23 2008
@@ -360,6 +360,11 @@ int ff_dirac_parse_sequence_header(GetBi
     if (parse_source_parameters(gb, avctx, source))
         return -1;
 
+    if (avcodec_check_dimensions(avctx, source->width, source->height))
+        return -1;
+
+    avcodec_set_dimensions(avctx, source->width, source->height);
+
     picture_coding_mode = svq3_get_ue_golomb(gb);
 
     return 0;

Modified: dirac/libavcodec/diracdec.c
==============================================================================
--- dirac/libavcodec/diracdec.c	(original)
+++ dirac/libavcodec/diracdec.c	Tue Nov 11 09:38:23 2008
@@ -880,11 +880,6 @@ int dirac_decode_frame(AVCodecContext *a
     if (parse_frame(s) < 0)
         return -1;
 
-    if (avcodec_check_dimensions(avctx, s->source.width, s->source.height))
-        return -1;
-
-    avcodec_set_dimensions(avctx, s->source.width, s->source.height);
-
     if (s->picture.data[0] != NULL)
         avctx->release_buffer(avctx, &s->picture);
 



More information about the FFmpeg-soc mailing list