[MPlayer-cvslog] r36896 - in trunk/libmpdemux: demux_film.c demux_fli.c demux_gif.c demux_mf.c demux_mng.c demux_mpg.c demux_nsv.c demux_pva.c demux_rawdv.c demux_rawvideo.c demux_roq.c demux_rtp_codec.cpp demux_sm...

reimar subversion at mplayerhq.hu
Thu Feb 20 00:01:15 CET 2014


Author: reimar
Date: Thu Feb 20 00:01:15 2014
New Revision: 36896

Log:
demuxers: ensure that stream ids are correctly initialized.

This should fix missing video after r36778 and potentially
other issues in relation with video stream switching.

Modified:
   trunk/libmpdemux/demux_film.c
   trunk/libmpdemux/demux_fli.c
   trunk/libmpdemux/demux_gif.c
   trunk/libmpdemux/demux_mf.c
   trunk/libmpdemux/demux_mng.c
   trunk/libmpdemux/demux_mpg.c
   trunk/libmpdemux/demux_nsv.c
   trunk/libmpdemux/demux_pva.c
   trunk/libmpdemux/demux_rawdv.c
   trunk/libmpdemux/demux_rawvideo.c
   trunk/libmpdemux/demux_roq.c
   trunk/libmpdemux/demux_rtp_codec.cpp
   trunk/libmpdemux/demux_smjpeg.c

Modified: trunk/libmpdemux/demux_film.c
==============================================================================
--- trunk/libmpdemux/demux_film.c	Thu Feb 20 00:01:13 2014	(r36895)
+++ trunk/libmpdemux/demux_film.c	Thu Feb 20 00:01:15 2014	(r36896)
@@ -280,6 +280,7 @@ static demuxer_t* demux_open_film(demuxe
       {
         // create and initialize the video stream header
         sh_video = new_sh_video(demuxer, 0);
+        demuxer->video->id = 0;
         demuxer->video->sh = sh_video;
         sh_video->ds = demuxer->video;
 
@@ -345,6 +346,7 @@ static demuxer_t* demux_open_film(demuxe
 
         // create and initialize the audio stream header
         sh_audio = new_sh_audio(demuxer, 0, NULL);
+        demuxer->audio->id = 0;
         demuxer->audio->sh = sh_audio;
         sh_audio->ds = demuxer->audio;
 

Modified: trunk/libmpdemux/demux_fli.c
==============================================================================
--- trunk/libmpdemux/demux_fli.c	Thu Feb 20 00:01:13 2014	(r36895)
+++ trunk/libmpdemux/demux_fli.c	Thu Feb 20 00:01:15 2014	(r36896)
@@ -128,6 +128,7 @@ static demuxer_t* demux_open_fli(demuxer
 
   // make sure the demuxer knows about the new video stream header
   // (even though new_sh_video() ought to take care of it)
+  demuxer->video->id = 0;
   demuxer->video->sh = sh_video;
 
   // make sure that the video demuxer stream header knows about its

Modified: trunk/libmpdemux/demux_gif.c
==============================================================================
--- trunk/libmpdemux/demux_gif.c	Thu Feb 20 00:01:13 2014	(r36895)
+++ trunk/libmpdemux/demux_gif.c	Thu Feb 20 00:01:15 2014	(r36896)
@@ -297,6 +297,7 @@ static demuxer_t* demux_open_gif(demuxer
 
   // make sure the demuxer knows about the new video stream header
   // (even though new_sh_video() ought to take care of it)
+  demuxer->video->id = 0;
   demuxer->video->sh = sh_video;
 
   // make sure that the video demuxer stream header knows about its

Modified: trunk/libmpdemux/demux_mf.c
==============================================================================
--- trunk/libmpdemux/demux_mf.c	Thu Feb 20 00:01:13 2014	(r36895)
+++ trunk/libmpdemux/demux_mf.c	Thu Feb 20 00:01:15 2014	(r36896)
@@ -147,6 +147,7 @@ static demuxer_t* demux_open_mf(demuxer_
   sh_video = new_sh_video(demuxer, 0);
   // make sure the demuxer knows about the new video stream header
   // (even though new_sh_video() ought to take care of it)
+  demuxer->video->id = 0;
   demuxer->video->sh = sh_video;
 
   // make sure that the video demuxer stream header knows about its

Modified: trunk/libmpdemux/demux_mng.c
==============================================================================
--- trunk/libmpdemux/demux_mng.c	Thu Feb 20 00:01:13 2014	(r36895)
+++ trunk/libmpdemux/demux_mng.c	Thu Feb 20 00:01:15 2014	(r36896)
@@ -428,6 +428,7 @@ static demuxer_t * demux_mng_open(demuxe
     // Make sure the demuxer knows about the new video stream header
     // (even though new_sh_video() ought to take care of it).
     // (Thanks to demux_gif.c for this.)
+    demuxer->video->id = 0;
     demuxer->video->sh = sh_video;
 
     // Make sure that the video demuxer stream header knows about its

Modified: trunk/libmpdemux/demux_mpg.c
==============================================================================
--- trunk/libmpdemux/demux_mpg.c	Thu Feb 20 00:01:13 2014	(r36895)
+++ trunk/libmpdemux/demux_mpg.c	Thu Feb 20 00:01:15 2014	(r36896)
@@ -1086,6 +1086,7 @@ static demuxer_t* demux_mpg_es_open(demu
 
     demuxer->audio->sh = NULL;   // ES streams has no audio channel
     demuxer->video->sh = new_sh_video(demuxer,0); // create dummy video stream header, id=0
+    demuxer->video->id = 0;
     sh_video=demuxer->video->sh;sh_video->ds=demuxer->video;
 
     return demuxer;
@@ -1094,6 +1095,7 @@ static demuxer_t* demux_mpg_es_open(demu
 static demuxer_t *demux_mpg_gxf_open(demuxer_t *demuxer) {
   demuxer->audio->sh = NULL;
   demuxer->video->sh = new_sh_video(demuxer,0);
+  demuxer->video->id = 0;
   ((sh_video_t *)demuxer->video->sh)->ds = demuxer->video;
   demuxer->priv = (void *) 0xffffffff;
   return demuxer;

Modified: trunk/libmpdemux/demux_nsv.c
==============================================================================
--- trunk/libmpdemux/demux_nsv.c	Thu Feb 20 00:01:13 2014	(r36895)
+++ trunk/libmpdemux/demux_nsv.c	Thu Feb 20 00:01:15 2014	(r36896)
@@ -214,6 +214,7 @@ static demuxer_t* demux_open_nsv ( demux
             /* Make sure the demuxer knows about the new video stream header
              * (even though new_sh_video() ought to take care of it)
              */
+            demuxer->video->id = 0;
             demuxer->video->sh = sh_video;
 
             /* Make sure that the video demuxer stream header knows about its

Modified: trunk/libmpdemux/demux_pva.c
==============================================================================
--- trunk/libmpdemux/demux_pva.c	Thu Feb 20 00:01:13 2014	(r36895)
+++ trunk/libmpdemux/demux_pva.c	Thu Feb 20 00:01:15 2014	(r36896)
@@ -156,6 +156,7 @@ static demuxer_t * demux_open_pva (demux
 
 	//printf("priv->just_synced %s after initial sync!\n",priv->just_synced?"set":"UNSET");
 
+	demuxer->video->id = 0;
 	demuxer->video->sh=sh_video;
 
 	//printf("demuxer->stream->end_pos= %d\n",demuxer->stream->end_pos);

Modified: trunk/libmpdemux/demux_rawdv.c
==============================================================================
--- trunk/libmpdemux/demux_rawdv.c	Thu Feb 20 00:01:13 2014	(r36895)
+++ trunk/libmpdemux/demux_rawdv.c	Thu Feb 20 00:01:15 2014	(r36896)
@@ -170,6 +170,7 @@ static demuxer_t* demux_open_rawdv(demux
    // make sure the demuxer knows about the new video stream header
    // (even though new_sh_video() ought to take care of it)
    demuxer->seekable = 1;
+   demuxer->video->id = 0;
    demuxer->video->sh = sh_video;
 
    // make sure that the video demuxer stream header knows about its

Modified: trunk/libmpdemux/demux_rawvideo.c
==============================================================================
--- trunk/libmpdemux/demux_rawvideo.c	Thu Feb 20 00:01:13 2014	(r36895)
+++ trunk/libmpdemux/demux_rawvideo.c	Thu Feb 20 00:01:15 2014	(r36896)
@@ -119,6 +119,7 @@ static demuxer_t* demux_rawvideo_open(de
   demuxer->movi_start = demuxer->stream->start_pos;
   demuxer->movi_end = demuxer->stream->end_pos;
 
+  demuxer->video->id = 0;
   demuxer->video->sh = sh_video;
   sh_video->ds = demuxer->video;
 

Modified: trunk/libmpdemux/demux_roq.c
==============================================================================
--- trunk/libmpdemux/demux_roq.c	Thu Feb 20 00:01:13 2014	(r36895)
+++ trunk/libmpdemux/demux_roq.c	Thu Feb 20 00:01:15 2014	(r36896)
@@ -136,6 +136,7 @@ static demuxer_t* demux_open_roq(demuxer
         // this is a good opportunity to create a video stream header
         sh_video = new_sh_video(demuxer, 0);
         // make sure the demuxer knows about the new stream header
+        demuxer->video->id = 0;
         demuxer->video->sh = sh_video;
         // make sure that the video demuxer stream header knows about its
         // parent video demuxer stream

Modified: trunk/libmpdemux/demux_rtp_codec.cpp
==============================================================================
--- trunk/libmpdemux/demux_rtp_codec.cpp	Thu Feb 20 00:01:13 2014	(r36895)
+++ trunk/libmpdemux/demux_rtp_codec.cpp	Thu Feb 20 00:01:15 2014	(r36896)
@@ -114,6 +114,7 @@ void rtpCodecInitialize_video(demuxer_t*
   sh_video->bih = bih;
   demux_stream_t* d_video = demuxer->video;
   d_video->sh = sh_video; sh_video->ds = d_video;
+  d_video->id = 0;
 
   // Map known video MIME types to the BITMAPINFOHEADER parameters
   // that this program uses.  (Note that not all types need all

Modified: trunk/libmpdemux/demux_smjpeg.c
==============================================================================
--- trunk/libmpdemux/demux_smjpeg.c	Thu Feb 20 00:01:13 2014	(r36895)
+++ trunk/libmpdemux/demux_smjpeg.c	Thu Feb 20 00:01:15 2014	(r36896)
@@ -126,6 +126,7 @@ static demuxer_t* demux_open_smjpeg(demu
 	{
 	case mmioFOURCC('_','V','I','D'):
 	    sh_video = new_sh_video(demuxer, 0);
+	    demuxer->video->id = 0;
 	    demuxer->video->sh = sh_video;
 	    sh_video->ds = demuxer->video;
 


More information about the MPlayer-cvslog mailing list