[FFmpeg-cvslog] mxfdec: Only use the new demuxing logic for OPAtom
Tomas Härdin
git at videolan.org
Fri Dec 16 15:33:46 CET 2011
ffmpeg | branch: release/0.9 | Tomas Härdin <tomas.hardin at codemill.se> | Thu Dec 15 13:16:36 2011 +0100| [35a42ca0bfdccbdc5511ca387659477f530c0165] | committer: Michael Niedermayer
mxfdec: Only use the new demuxing logic for OPAtom
This is a stopgap for ticket #746.
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=35a42ca0bfdccbdc5511ca387659477f530c0165
---
libavformat/mxfdec.c | 4 ++--
tests/ref/seek/lavf_mxf | 41 +++++++++++++++++++++++------------------
2 files changed, 25 insertions(+), 20 deletions(-)
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 2b2eb98..4a90827 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -433,7 +433,7 @@ static int mxf_read_packet(AVFormatContext *s, AVPacket *pkt)
/* TODO: better logic for this?
* only files that lack all index segments prior to the essence need this */
- if (!s->pb->seekable && mxf->op != OPAtom || mxf->d10 || mxf->broken_index)
+ if (mxf->op != OPAtom)
return mxf_read_packet_old(s, pkt);
if (mxf->current_stream >= s->nb_streams) {
@@ -1761,7 +1761,7 @@ static int mxf_read_seek(AVFormatContext *s, int stream_index, int64_t sample_ti
int64_t seekpos;
int index;
- if (mxf->d10) {
+ if (mxf->op != OPAtom) {
if (!s->bit_rate)
return -1;
if (sample_time < 0)
diff --git a/tests/ref/seek/lavf_mxf b/tests/ref/seek/lavf_mxf
index 00dea3d..4c1aecc 100644
--- a/tests/ref/seek/lavf_mxf
+++ b/tests/ref/seek/lavf_mxf
@@ -2,47 +2,52 @@ ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 6144 size: 24801
ret: 0 st:-1 flags:0 ts:-1.000000
ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 6144 size: 24801
ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 460800 size: 24712
+ret:-1
ret: 0 st: 0 flags:0 ts: 0.800000
-ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 460800 size: 24712
+ret:-1
ret: 0 st: 0 flags:1 ts:-0.320000
ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 6144 size: 24801
-ret:-1 st: 1 flags:0 ts: 2.560000
+ret: 0 st: 1 flags:0 ts: 2.560000
+ret:-1
ret: 0 st: 1 flags:1 ts: 1.480000
-ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 460800 size: 24712
+ret:-1
ret: 0 st:-1 flags:0 ts: 0.365002
-ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 211968 size: 24787
+ret: 0 st: 0 flags:1 dts: 0.360000 pts: NOPTS pos: 6144 size: 24801
ret: 0 st:-1 flags:1 ts:-0.740831
ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 6144 size: 24801
-ret:-1 st: 0 flags:0 ts: 2.160000
+ret: 0 st: 0 flags:0 ts: 2.160000
+ret:-1
ret: 0 st: 0 flags:1 ts: 1.040000
-ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 460800 size: 24712
+ret:-1
ret: 0 st: 1 flags:0 ts:-0.040000
ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 6144 size: 24801
ret: 0 st: 1 flags:1 ts: 2.840000
-ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 460800 size: 24712
-ret:-1 st:-1 flags:0 ts: 1.730004
+ret:-1
+ret: 0 st:-1 flags:0 ts: 1.730004
+ret:-1
ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 211968 size: 24787
+ret:-1
ret: 0 st: 0 flags:0 ts:-0.480000
ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 6144 size: 24801
ret: 0 st: 0 flags:1 ts: 2.400000
-ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 460800 size: 24712
-ret:-1 st: 1 flags:0 ts: 1.320000
+ret:-1
+ret: 0 st: 1 flags:0 ts: 1.320000
+ret:-1
ret: 0 st: 1 flags:1 ts: 0.200000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 6144 size: 24801
+ret: 0 st: 0 flags:1 dts: 0.200000 pts: NOPTS pos: 6144 size: 24801
ret: 0 st:-1 flags:0 ts:-0.904994
ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 6144 size: 24801
ret: 0 st:-1 flags:1 ts: 1.989173
-ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 460800 size: 24712
+ret:-1
ret: 0 st: 0 flags:0 ts: 0.880000
-ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 460800 size: 24712
+ret:-1
ret: 0 st: 0 flags:1 ts:-0.240000
ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 6144 size: 24801
-ret:-1 st: 1 flags:0 ts: 2.680000
+ret: 0 st: 1 flags:0 ts: 2.680000
+ret:-1
ret: 0 st: 1 flags:1 ts: 1.560000
-ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 460800 size: 24712
+ret:-1
ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 460800 size: 24712
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: NOPTS pos: 6144 size: 24801
ret: 0 st:-1 flags:1 ts:-0.645825
ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 6144 size: 24801
More information about the ffmpeg-cvslog
mailing list