lavf/mxfenc: better error handling with invalid frame rate.
authorClément Bœsch <clement.boesch@smartjog.com>
Fri, 3 Aug 2012 08:20:44 +0000 (10:20 +0200)
committerClément Bœsch <ubitux@gmail.com>
Wed, 8 Aug 2012 07:11:25 +0000 (09:11 +0200)
libavformat/mxfenc.c

index 58c3111..2d5bf67 100644 (file)
@@ -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);