[FFmpeg-cvslog] lavf/mxfenc: better error handling with invalid frame rate.

Clément Bœsch git at videolan.org
Wed Aug 8 09:12:24 CEST 2012


ffmpeg | branch: master | Clément Bœsch <clement.boesch at smartjog.com> | Fri Aug  3 10:20:44 2012 +0200| [6b3484dcbc6fe6a5f3d0919922790592c9d5a608] | committer: Clément Bœsch

lavf/mxfenc: better error handling with invalid frame rate.

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

 libavformat/mxfenc.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c
index 58c3111..2d5bf67 100644
--- a/libavformat/mxfenc.c
+++ b/libavformat/mxfenc.c
@@ -1705,8 +1705,9 @@ static int mxf_write_header(AVFormatContext *s)
                 mxf->time_base = (AVRational){ 1001, 60000 };
                 break;
             default:
-                av_log(s, AV_LOG_ERROR, "unsupported video frame rate\n");
-                return -1;
+                av_log(s, AV_LOG_ERROR, "Unsupported video frame rate %d/%d\n",
+                       tbc.den, tbc.num);
+                return AVERROR(EINVAL);
             }
             rate = av_inv_q(mxf->time_base);
             avpriv_set_pts_info(st, 64, mxf->time_base.num, mxf->time_base.den);



More information about the ffmpeg-cvslog mailing list