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).
This commit is contained in:
wm4 2017-11-06 17:13:42 +01:00
parent e598b19dad
commit 4ef0887f7b
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}