[vlc-commits] Avformat demux: don't add empty tracks in AVMEDIA_TYPE_DATA cases

Jean-Baptiste Kempf git at videolan.org
Thu Aug 18 14:29:13 CEST 2011


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu Aug 18 14:26:39 2011 +0200| [ce946ab3a55386681ae543f8fbf3c4f9f3a74573] | committer: Jean-Baptiste Kempf

Avformat demux: don't add empty tracks in AVMEDIA_TYPE_DATA cases

Ref: #5204

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ce946ab3a55386681ae543f8fbf3c4f9f3a74573
---

 modules/demux/avformat/demux.c |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/modules/demux/avformat/demux.c b/modules/demux/avformat/demux.c
index e20d249..5fe1834 100644
--- a/modules/demux/avformat/demux.c
+++ b/modules/demux/avformat/demux.c
@@ -373,13 +373,14 @@ int OpenDemux( vlc_object_t *p_this )
                 }
                 else msg_Warn( p_demux, "unsupported attachment type (%u) in ffmpeg demux", cc->codec_id );
             }
-            break;
+            else
 #endif
+            {
+                if( cc->codec_type == AVMEDIA_TYPE_DATA )
+                    psz_type = "data";
 
-            if( cc->codec_type == AVMEDIA_TYPE_DATA )
-                psz_type = "data";
-
-            msg_Warn( p_demux, "unsupported track type in ffmpeg demux" );
+                msg_Warn( p_demux, "unsupported track type in ffmpeg demux" );
+            }
             break;
         }
 
@@ -393,6 +394,7 @@ int OpenDemux( vlc_object_t *p_this )
 #ifdef HAVE_FFMPEG_CODEC_ATTACHMENT
         if( cc->codec_type != AVMEDIA_TYPE_ATTACHMENT )
 #endif
+        if( cc->codec_type != AVMEDIA_TYPE_DATA )
         {
             const bool    b_ogg = !strcmp( p_sys->fmt->name, "ogg" );
             const uint8_t *p_extra = cc->extradata;



More information about the vlc-commits mailing list