summaryrefslogtreecommitdiff
path: root/libavformat/yuv4mpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2005-05-26 20:17:12 +0000
committerMichael Niedermayer <michaelni@gmx.at>2005-05-26 20:17:12 +0000
commit2692067a45e4cb4ce0028e170673f2b2f5039721 (patch)
tree19b10f28c74700113729a7ae6861c734e8bfab01 /libavformat/yuv4mpeg.c
parent4aa606ec179a7df514fe5839b7ab5e24b42145b8 (diff)
AVPacket.pos
Originally committed as revision 4314 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/yuv4mpeg.c')
-rw-r--r--libavformat/yuv4mpeg.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/libavformat/yuv4mpeg.c b/libavformat/yuv4mpeg.c
index 7aead7b056..74519fa1b6 100644
--- a/libavformat/yuv4mpeg.c
+++ b/libavformat/yuv4mpeg.c
@@ -356,17 +356,11 @@ static int yuv4_read_packet(AVFormatContext *s, AVPacket *pkt)
if (packet_size < 0)
return -1;
- if (av_new_packet(pkt, packet_size) < 0)
+ if (av_get_packet(&s->pb, pkt, packet_size) != packet_size)
return AVERROR_IO;
pkt->stream_index = 0;
- ret = get_buffer(&s->pb, pkt->data, pkt->size);
- if (ret != pkt->size) {
- av_free_packet(pkt);
- return AVERROR_IO;
- } else {
- return 0;
- }
+ return 0;
}
static int yuv4_read_close(AVFormatContext *s)