1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-09-01 14:06:45 +02:00

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

This commit is contained in:
Clément Bœsch 2012-08-03 10:20:44 +02:00 committed by Clément Bœsch
parent aad737c669
commit 6b3484dcbc

View File

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