From 4ef0887f7b204b5a2bedb11ce0a6089bea5915cb Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 6 Nov 2017 17:13:42 +0100 Subject: demux: explicitly discard 0 sized packets libavcodec can't deal with them, because its API doesn't distinguish between 0 sized packets and sending EOF. As such, keeping them doesn't do any good, ever. This actually fixes some obscure mkv sample (see previous commit). --- demux/demux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'demux') diff --git a/demux/demux.c b/demux/demux.c index 1cd8a169bc..85acce28db 100644 --- a/demux/demux.c +++ b/demux/demux.c @@ -748,7 +748,7 @@ static void adjust_seek_range_on_packet(struct demux_stream *ds, void demux_add_packet(struct sh_stream *stream, demux_packet_t *dp) { struct demux_stream *ds = stream ? stream->ds : NULL; - if (!dp || !ds) { + if (!dp || !dp->len || !ds) { talloc_free(dp); return; } -- cgit v1.2.3