[FFmpeg-devel] [PATCH] avf:rmdec.c fill duration to AVFormatContext
Michael Niedermayer
michaelni at gmx.at
Wed Jul 11 13:02:44 CEST 2012
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
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120711/699811ac/attachment.asc>
More information about the ffmpeg-devel
mailing list