mpegps: Use av_get_packet() instead of poorly emulating it.
This commit is contained in:
parent
c2f2dfb3dd
commit
98ef887a75
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user