diff options
author | Alex Converse <alex.converse@gmail.com> | 2011-10-08 04:02:36 +0400 |
---|---|---|
committer | Alex Converse <alex.converse@gmail.com> | 2011-10-08 04:04:14 +0400 |
commit | 98ef887a759c66febcb612407c6bb361c4d50bcb (patch) | |
tree | bb185cdab4c469483f0aa5f5d6a9d280e7aee43a /libavformat/mpeg.c | |
parent | c2f2dfb3dd20e036b8b08c0fd1486a3044e8f02a (diff) |
mpegps: Use av_get_packet() instead of poorly emulating it.
Diffstat (limited to 'libavformat/mpeg.c')
-rw-r--r-- | libavformat/mpeg.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c index ef683b1a05..52bf40faa5 100644 --- a/libavformat/mpeg.c +++ b/libavformat/mpeg.c @@ -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; |