[FFmpeg-devel] [PATCH] thp: set duration

Derek Buitenhuis derek.buitenhuis at gmail.com
Sat Dec 15 23:59:21 CET 2012


On 15/12/2012 11:53 AM, Piotr Bandurski wrote:
> diff --git a/libavformat/thp.c b/libavformat/thp.c
> index 4463484..f2fcd5a 100644
> --- a/libavformat/thp.c
> +++ b/libavformat/thp.c
> @@ -110,6 +110,7 @@ static int thp_read_header(AVFormatContext *s)
>              st->codec->width = avio_rb32(pb);
>              st->codec->height = avio_rb32(pb);
>              st->codec->sample_rate = av_q2d(thp->fps);
> +            st->duration = thp->framecnt;

This looks very wrong. Duration is supposed to be in time_base, not frames.
This should be it nb_frames instead, no?

- Derek



More information about the ffmpeg-devel mailing list