projects
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c2f2dfb
)
mpegps: Use av_get_packet() instead of poorly emulating it.
author
Alex Converse
<alex.converse@gmail.com>
Sat, 8 Oct 2011 00:02:36 +0000
(17:02 -0700)
committer
Alex Converse
<alex.converse@gmail.com>
Sat, 8 Oct 2011 00:04:14 +0000
(17:04 -0700)
libavformat/mpeg.c
patch
|
blob
|
history
diff --git
a/libavformat/mpeg.c
b/libavformat/mpeg.c
index
ef683b1
..
52bf40f
100644
(file)
--- 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);
}
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;
pkt->pts = pts;
pkt->dts = dts;
pkt->pos = dummy_pos;