[FFmpeg-devel] [PATCH] avf:rmdec.c fill duration to AVFormatContext

William Yu genwillyu at gmail.com
Wed Jul 11 07:12:19 CEST 2012


2012/7/6 Michael Niedermayer <michaelni at gmx.at>:
> On Fri, Jul 06, 2012 at 12:29:15PM +0800, William Yu wrote:
>> I think rmdec should fill duration to AVFormatContext so that ffprobe
>> can check duration for rm file.
>>
>> ---
>>  libavformat/rmdec.c | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
>> index d919a9a..901bcc8 100644
>> --- a/libavformat/rmdec.c
>> +++ b/libavformat/rmdec.c
>> @@ -475,7 +475,8 @@ static int rm_read_header(AVFormatContext *s)
>>              avio_rb32(pb); /* max packet size */
>>              avio_rb32(pb); /* avg packet size */
>>              avio_rb32(pb); /* nb packets */
>> -            avio_rb32(pb); /* duration */
>> +            duration = avio_rb32(pb); /* duration */
>> +            s->duration = av_rescale(duration, AV_TIME_BASE, 1000);
>>              avio_rb32(pb); /* preroll */
>
> isnt the MDPR parsing code enough to get this set already ?
Sorry for my delay.
I have a rm file. It only set duration in PROP. video and audio
stream's duration in MDPR are zero.
But MediaInfo can show this file's duration.

> if no, can you share the rm file that needs this
I have not a host to share this rm file. What can i do for share this
file in another way? This file size is exceed 27M.
>
> [...]
> --
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> The bravest are surely those who have the clearest vision
> of what is before them, glory and danger alike, and yet
> notwithstanding go out to meet it. -- Thucydides
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>


More information about the ffmpeg-devel mailing list