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

William Yu genwillyu at gmail.com
Thu Jul 12 04:36:51 CEST 2012


2012/7/11 Michael Niedermayer <michaelni at gmx.at>:
> On Wed, Jul 11, 2012 at 01:12:19PM +0800, William Yu wrote:
>> 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.
>
> see "Submitting Sample Media" on http://ffmpeg.org/bugreports.html
> also once uploaded please tell us the filename
The rm file has been upload to ftp://ftp.ffmpeg.org/incoming.
The file name is zero_dur.rmvb

Thanks.

> [...]
> --
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> Many things microsoft did are stupid, but not doing something just because
> microsoft did it is even more stupid. If everything ms did were stupid they
> would be bankrupt already.
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>


More information about the ffmpeg-devel mailing list