This fixes crashes, where the demuxer could return 0 even
if the returned AVPacket isn't initialized at all. This
could happen if running into EOF or running out of probesize
with non-seekable sources.
Signed-off-by: Martin Storsjö <martin@martin.st>
MpegTSContext *ts = s->priv_data;
int ret, i;
+ pkt->size = -1;
ts->pkt = pkt;
ret = handle_packets(ts, 0);
if (ret < 0) {
}
}
+ if (!ret && pkt->size < 0)
+ ret = AVERROR(EINTR);
return ret;
}