changeset 14611:0c4a7d871288

discard lavf packets with wrong ids
author nicodvb
date Sun, 30 Jan 2005 09:13:28 +0000
parents 9e81b41838e6
children 4825fb5a45b9
files libmpdemux/demux_lavf.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_lavf.c	Sat Jan 29 21:26:20 2005 +0000
+++ b/libmpdemux/demux_lavf.c	Sun Jan 30 09:13:28 2005 +0000
@@ -292,8 +292,10 @@
             ds->sh=demux->v_streams[id];
             mp_msg(MSGT_DEMUX,MSGL_V,"Auto-selected LAVF video ID = %d\n",ds->id);
         }
-    } else
-        ds= NULL;
+    } else {
+        av_free_packet(&pkt);
+        return 1;
+    }
         
     if(0/*pkt.destruct == av_destruct_packet*/){
         //ok kids, dont try this at home :)