[FFmpeg-devel] [PATCH] Wrong duration in TS container (Ticket #1836)
michaelni at gmx.at
Tue Oct 23 18:27:42 CEST 2012
On Tue, Oct 23, 2012 at 08:59:07AM +0900, Heesuk Jung wrote:
> Hi Michael,
> Please review the latest patch as below.
> I understood your comment and so I don't change "MPEGTS" condition.
> I improved 5 problematic files after applying patch.
> * Test Result for 5 problematic files
> Correct Duration After Patch Before Patch
> 472_tp_mpeg2_mp3.tp 00:00:13 00:00:21 N/A
> C049_flv.flv 00:00:27 00:00:26 00:03:44
> 473_tp_mpeg2_ac3.tp 00:00:19 00:00:21 00:03:15
These 2 may need a heuristic like your patch, i dont immedeatly see
a better solution
> _TRP_MPEG2_MP2.tp 00:01:12 00:01:12 24:08:38
> _WMV_WVC1_NONE.wmv 00:08:20 00:08:17 01:29:14
this file is truncated, ive fixed the demuxer to handle this better
> @@ -2012,6 +2012,57 @@ int avformat_seek_file(AVFormatContext *s, int
> stream_index, int64_t min_ts, int
> // try some generic seek like seek_frame_generic() but with new ts
> semantics }
> + * examine if duration is valid based on bit rate information or not.
> + * Duration is considered if duration is unreasonably bigger than file
> size/average bit rate.
> + * hueristically suggest limit_filesize_multiple that means double
the diff appears currupted through line wraping, please attach a
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Rewriting code that is poorly written but fully understood is good.
Rewriting code that one doesnt understand is a sign that one is less smart
then the original author, trying to rewrite it will not make it better.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: Digital signature
More information about the ffmpeg-devel