summaryrefslogtreecommitdiffstats
path: root/demux/demux.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-11-06 17:13:42 +0100
committerwm4 <wm4@nowhere>2017-11-06 17:13:42 +0100
commit4ef0887f7b204b5a2bedb11ce0a6089bea5915cb (patch)
treebf109d0892682d64703c91cb64731702c85204c4 /demux/demux.c
parente598b19dad9638c2c108ac5f39df6573563b0691 (diff)
downloadmpv-4ef0887f7b204b5a2bedb11ce0a6089bea5915cb.tar.bz2
mpv-4ef0887f7b204b5a2bedb11ce0a6089bea5915cb.tar.xz
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).
Diffstat (limited to 'demux/demux.c')
-rw-r--r--demux/demux.c2
1 files changed, 1 insertions, 1 deletions
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;
}