[FFmpeg-cvslog] avformat: gather aspect ratio from rv30/40 in find_stream_info

Michael Niedermayer git at videolan.org
Sun Mar 3 18:55:17 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Mar  3 18:41:16 2013 +0100| [f2cb993139415bd5cadf70d01a9a32a97974df68] | committer: Michael Niedermayer

avformat: gather aspect ratio from rv30/40 in find_stream_info

Fixes Ticket1550

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f2cb993139415bd5cadf70d01a9a32a97974df68
---

 libavformat/utils.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index 6024205..7f90a9a 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2438,6 +2438,9 @@ static int has_codec_parameters(AVStream *st, const char **errmsg_ptr)
             FAIL("unspecified size");
         if (st->info->found_decoder >= 0 && avctx->pix_fmt == AV_PIX_FMT_NONE)
             FAIL("unspecified pixel format");
+        if (st->codec->codec_id == AV_CODEC_ID_RV30 || st->codec->codec_id == AV_CODEC_ID_RV40)
+            if (!st->sample_aspect_ratio.num && !st->codec->sample_aspect_ratio.num && !st->codec_info_nb_frames)
+                FAIL("no frame in rv30/40 and no sar");
         break;
     case AVMEDIA_TYPE_SUBTITLE:
         if (avctx->codec_id == AV_CODEC_ID_HDMV_PGS_SUBTITLE && !avctx->width)



More information about the ffmpeg-cvslog mailing list