[FFmpeg-devel] [PATCH] avf:rmdec.c fill duration to AVFormatContext
Michael Niedermayer
michaelni at gmx.at
Fri Jul 6 09:42:20 CEST 2012
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 ?
if no, can you share the rm file that needs this
[...]
--
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
-------------- 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/20120706/dc45a303/attachment.asc>
More information about the ffmpeg-devel
mailing list