[FFmpeg-devel] [PATCH] do not reset duration_error for all streams
Baptiste Coudurier
baptiste.coudurier
Thu Mar 6 13:54:24 CET 2008
Hi
Current code in av_find_stream_infos will reset duration_error for all
streams, I think it should only reset for current stream.
Example: audio packet is read after video packet, it will reset video
stream duration_error, and therefore will confuse frame rate detection
executed after.
wrong_fps.gxf:
FFmpeg version SVN-r12348, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-libmp3lame --enable-libfaac
--enable-liba52 --enable-libx264 --enable-libxvid --enable-libfaad
--enable-libgsm --enable-pp --enable-nonfree --enable-libamr-nb
--enable-libtheora
libavutil version: 49.6.0
libavcodec version: 51.51.0
libavformat version: 52.8.0
libavdevice version: 52.0.0
built on Mar 6 2008 10:20:54, gcc: 4.3.0 20080301 (prerelease)
[gcc-4_3-branch revision 132801]
0.083333 0.000000
0.166667 0.000000
[...]
24.916667 0.000000
25.000000 0.000000
25.083333 0.000000
[...]
23.976024 0.000000
29.970030 0.000000
59.940060 0.000000
11.988012 0.000000
14.985015 0.000000
Seems stream 0 codec frame rate differs from container frame rate: 25.00
(25/1) -> 0.08 (1/12)
Input #0, gxf, from 'wrong_fps.gxf':
Duration: 00:00:08.4, start: 0.000000, bitrate: 54865 kb/s
Stream #0.0: Video: mpeg2video, yuv422p, 720x608 [PAR 152:135 DAR
4:3], 50000 kb/s, 0.08 tb(r)
Stream #0.1: Audio: pcm_s24le, 48000 Hz, mono, 1152 kb/s
Stream #0.2: Audio: pcm_s24le, 48000 Hz, mono, 1152 kb/s
Stream #0.3: Audio: pcm_s24le, 48000 Hz, mono, 1152 kb/s
Stream #0.4: Audio: pcm_s24le, 48000 Hz, mono, 1152 kb/s
Stream #0.5: Data: 0x0000
With patch:
0.083333 1985.984000
0.166667 3971.968000
[...]
24.916667 6.642087
25.000000 0.000000
25.083333 6.597953
[...]
23.976024 821.499500
29.970030 484.557600
59.940060 244.791600
11.988012 1211.800000
14.985015 959.395200
Input #0, gxf, from 'wrong_frame_rate.gxf':
Duration: 00:00:08.4, start: 0.000000, bitrate: 54865 kb/s
Stream #0.0: Video: mpeg2video, yuv422p, 720x608 [PAR 152:135 DAR
4:3], 50000 kb/s, 25.00 tb(r)
Stream #0.1: Audio: pcm_s24le, 48000 Hz, mono, 1152 kb/s
Stream #0.2: Audio: pcm_s24le, 48000 Hz, mono, 1152 kb/s
Stream #0.3: Audio: pcm_s24le, 48000 Hz, mono, 1152 kb/s
Stream #0.4: Audio: pcm_s24le, 48000 Hz, mono, 1152 kb/s
Stream #0.5: Data: 0x0000
Must supply at least one output file
wrong_fps.gxf uploaded to mplayerhq.hu incoming.
--
Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA
SMARTJOG S.A. http://www.smartjog.com
Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
Phone: +33 1 49966312
-------------- next part --------------
A non-text attachment was scrubbed...
Name: frame_rate_reset.patch
Type: text/x-diff
Size: 715 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080306/1d76ec3d/attachment.patch>
More information about the ffmpeg-devel
mailing list