Re: Regression playing MOV files with xine-1.1.21

"Torsten Jager" <[email protected]>
Newsgroups gmane.comp.video.xine.devel
Message-ID <[email protected]>
Fixed demux_qt for the pts < dts case.

Such streams violate the Universal Law of Causality.
Lets be tolerant -- this time.

Dont back out the fix, apply on top.

Torsten


-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de

------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2

_______________________________________________
xine-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xine-devel
demux_qt_pts_fix_2.diff (application/octet-stream, 978 B)
--- xine-lib-20120228/src/demuxers/demux_qt.c	2012-02-28 23:25:40.000000000 +0100
+++ xine-lib-20120228/src/demuxers/demux_qt.c	2012-04-13 22:08:08.000000000 +0200
@@ -2020,9 +2020,11 @@ static qt_error build_frame_table(qt_tra
 
           /* offset pts for reordered video */
           if (ptsoffs_index < trak->timeoffs_to_sample_count) {
-            trak->frames[frame_counter].ptsoffs = 90000 *
-              trak->timeoffs_to_sample_table[ptsoffs_index].duration /
-              trak->timescale;
+            /* TJ. this is 32 bit signed. All casts necessary for my gcc 4.5.0 */
+            int i = trak->timeoffs_to_sample_table[ptsoffs_index].duration;
+            if ((sizeof (int) > 4) && (i & 0x80000000))
+              i |= ~0xffffffffL;
+            trak->frames[frame_counter].ptsoffs = (int)90000 * i / (int)trak->timescale;
             ptsoffs_index_countdown--;
             /* time to refresh countdown? */
             if (!ptsoffs_index_countdown) {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.