Commit 98ef887a authored by Alex Converse's avatar Alex Converse

mpegps: Use av_get_packet() instead of poorly emulating it.

parent c2f2dfb3
......@@ -566,14 +566,7 @@ static int mpegps_read_packet(AVFormatContext *s,
else if (st->codec->bits_per_coded_sample == 28)
return AVERROR(EINVAL);
}
av_new_packet(pkt, len);
ret = avio_read(s->pb, pkt->data, pkt->size);
if (ret < 0) {
pkt->size = 0;
} else if (ret < pkt->size) {
pkt->size = ret;
memset(pkt->data + ret, 0, FF_INPUT_BUFFER_PADDING_SIZE);
}
ret = av_get_packet(s->pb, pkt, len);
pkt->pts = pts;
pkt->dts = dts;
pkt->pos = dummy_pos;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment