summaryrefslogtreecommitdiff
path: root/libavformat/flvdec.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/flvdec.c')
-rw-r--r--libavformat/flvdec.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index 942e188edc..187a692ea9 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
@@ -147,12 +147,8 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt)
}
}
- if (av_new_packet(pkt, size) < 0)
- return AVERROR_IO;
-
- ret = get_buffer(&s->pb, pkt->data, size);
+ ret= av_get_packet(&s->pb, pkt, size);
if (ret <= 0) {
- av_free_packet(pkt);
return AVERROR_IO;
}
/* note: we need to modify the packet size here to handle the last