[MPlayer-dev-eng] patch: YUV4MPEG2 demuxer
Rik Snel
rsnel at cube.dyndns.org
Fri Dec 28 17:26:14 CET 2001
Hello all,
This patch fixes the detection problem of YUV4MPEG when piping from slow
standard input (useful for mencoder, less useful for playback, of
course). It moves YUV4MPEG(2) detection before ASF detection. (the
problem occurs with YUV4MPEG because the header is shorter than the header
of YUV4MPEG2) (for a full description of the problem, see my previous
message). I tested the patch, and it doesn't seem to break anything.
Please apply.
Greetings,
Rik.
--------
Nothing is ever a total loss; it can always serve as a bad example.
-------------- next part --------------
diff -Naur main/libmpdemux/demuxer.c main.sfix/libmpdemux/demuxer.c
--- main/libmpdemux/demuxer.c Fri Dec 28 09:38:59 2001
+++ main.sfix/libmpdemux/demuxer.c Fri Dec 28 16:51:18 2001
@@ -415,20 +415,20 @@
}
}
}
-//=============== Try to open as ASF file: =================
-if(file_format==DEMUXER_TYPE_UNKNOWN || file_format==DEMUXER_TYPE_ASF){
- demuxer=new_demuxer(stream,DEMUXER_TYPE_ASF,audio_id,video_id,dvdsub_id);
- if(asf_check_header(demuxer)){
- mp_msg(MSGT_DEMUXER,MSGL_INFO,MSGTR_DetectedASFfile);
- file_format=DEMUXER_TYPE_ASF;
- }
-}
//=============== Try to open as Y4M file: =================
if(file_format==DEMUXER_TYPE_UNKNOWN || file_format==DEMUXER_TYPE_Y4M){
demuxer=new_demuxer(stream,DEMUXER_TYPE_Y4M,audio_id,video_id,dvdsub_id);
if(y4m_check_file(demuxer)){
mp_msg(MSGT_DEMUXER,MSGL_INFO,"Detected YUV4MPEG2 file format!\n");
file_format=DEMUXER_TYPE_Y4M;
+ }
+}
+//=============== Try to open as ASF file: =================
+if(file_format==DEMUXER_TYPE_UNKNOWN || file_format==DEMUXER_TYPE_ASF){
+ demuxer=new_demuxer(stream,DEMUXER_TYPE_ASF,audio_id,video_id,dvdsub_id);
+ if(asf_check_header(demuxer)){
+ mp_msg(MSGT_DEMUXER,MSGL_INFO,MSGTR_DetectedASFfile);
+ file_format=DEMUXER_TYPE_ASF;
}
}
//=============== Try to open as NUV file: =================
More information about the MPlayer-dev-eng
mailing list