[FFmpeg-devel] [PATCH 4/4] movenc: check that fps for tmcd is within encodable range.

Paul B Mahol onemda at gmail.com
Thu Jan 17 19:09:44 CET 2013


On 1/17/13, Michael Niedermayer <michaelni at gmx.at> wrote:
> Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> ---
>  libavformat/movenc.c |    3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/libavformat/movenc.c b/libavformat/movenc.c
> index d9b002e..b44f316 100644
> --- a/libavformat/movenc.c
> +++ b/libavformat/movenc.c
> @@ -1149,6 +1149,9 @@ static int mov_write_tmcd_tag(AVIOContext *pb,
> MOVTrack *track)
>      int frame_duration = av_rescale(track->timescale,
> track->enc->time_base.num, track->enc->time_base.den);
>      int nb_frames = 1.0/av_q2d(track->enc->time_base) + 0.5;
>
> +    if (nb_frames > 255)
> +        return AVERROR(EINVAL);
> +

Missing message why it is wrong and commit log that explains why higher
values do not make sense(guessing, since I know nothing about tmcd tag)

>      avio_wb32(pb, 0); /* size */
>      ffio_wfourcc(pb, "tmcd");               /* Data format */
>      avio_wb32(pb, 0);                       /* Reserved */
> --
> 1.7.9.5
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>


More information about the ffmpeg-devel mailing list