changeset 7594:a715a0960762

This just corrects a function name to match the other demuxer's "xxx_check_file" convention, adds a verbose note about (to match the other demuxers) patch by Kees Cook <mplayer@outflux.net>
author arpi
date Fri, 04 Oct 2002 19:23:36 +0000
parents 95c38a7d5240
children b667328dc62e
files libmpdemux/demux_rawdv.c libmpdemux/demuxer.c
diffstat 2 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_rawdv.c	Fri Oct 04 19:22:29 2002 +0000
+++ b/libmpdemux/demux_rawdv.c	Fri Oct 04 19:23:36 2002 +0000
@@ -59,12 +59,15 @@
    frames->current_filepos=newpos*frames->frame_size;
 }
 
-int check_file_rawdv(demuxer_t *demuxer)
+int rawdv_check_file(demuxer_t *demuxer)
 {
    unsigned char tmp_buffer[DV_PAL_FRAME_SIZE];
    int bytes_read=0;
    int result=0;
    dv_decoder_t *td;
+
+   mp_msg(MSGT_DEMUX,MSGL_V,"Checking for DV\n");
+
    stream_reset(demuxer->stream);
    stream_seek(demuxer->stream, 0);
    bytes_read=stream_read(demuxer->stream,tmp_buffer,DV_PAL_FRAME_SIZE);
@@ -105,7 +108,7 @@
    dp_video->pos=frames->current_filepos;
    dp_video->flags=0;
 
-   if (demuxer->audio)
+   if (demuxer->audio && demuxer->audio->id!=-2)
 	{
       demux_packet_t* dp_audio=clone_demux_packet(dp_video);
       ds_add_packet(demuxer->audio,dp_audio);
--- a/libmpdemux/demuxer.c	Fri Oct 04 19:22:29 2002 +0000
+++ b/libmpdemux/demuxer.c	Fri Oct 04 19:23:36 2002 +0000
@@ -516,7 +516,7 @@
 int demux_open_roq(demuxer_t* demuxer);
 #ifdef HAVE_LIBDV095
 int demux_open_rawdv(demuxer_t* demuxer);
-extern int check_file_rawdv(demuxer_t *demuxer);
+extern int rawdv_check_file(demuxer_t *demuxer);
 #endif
 
 extern int vivo_check_file(demuxer_t *demuxer);
@@ -831,7 +831,7 @@
 if(file_format==DEMUXER_TYPE_UNKNOWN || file_format==DEMUXER_TYPE_RAWDV)
 {
    demuxer=new_demuxer(stream,DEMUXER_TYPE_RAWDV,audio_id,video_id,dvdsub_id);
-   if(check_file_rawdv(demuxer))
+   if(rawdv_check_file(demuxer))
    {
       mp_msg(MSGT_DEMUXER,MSGL_INFO,MSGTR_Detected_XXX_FileFormat,"RAWDV");
       file_format=DEMUXER_TYPE_RAWDV;