[FFmpeg-soc] [soc]: r3823 - dirac/libavcodec/dirac.c

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


Author: conrad
Date: Tue Nov 11 09:38:28 2008
New Revision: 3823

Log:
Add version check


Modified:
   dirac/libavcodec/dirac.c

Modified: dirac/libavcodec/dirac.c
==============================================================================
--- dirac/libavcodec/dirac.c	(original)
+++ dirac/libavcodec/dirac.c	Tue Nov 11 09:38:28 2008
@@ -338,8 +338,10 @@ int ff_dirac_parse_sequence_header(GetBi
     /* parse parameters */
     version_major = svq3_get_ue_golomb(gb);
     version_minor = svq3_get_ue_golomb(gb);
-    /* XXX: Don't check the version yet, existing encoders do not yet
-       set this to a sane value (0.6 at the moment). */
+    if (version_major < 2 || (version_major == 2 && version_minor < 2))
+        av_log(avctx, AV_LOG_WARNING, "Stream is old and may not work\n");
+    else if (version_major > 2)
+        av_log(avctx, AV_LOG_WARNING, "Stream may have unhandled features\n");
 
     avctx->profile = svq3_get_ue_golomb(gb);
     avctx->level   = svq3_get_ue_golomb(gb);



More information about the FFmpeg-soc mailing list