mirror of https://github.com/mpv-player/mpv
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:
parent
e598b19dad
commit
4ef0887f7b
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue