diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2012-05-01 19:59:29 +0200 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2012-05-01 23:20:52 +0200 |
commit | 8f63f241d499a01d086874af36801167b72b7036 (patch) | |
tree | 1ff0d94ac5bcb721d7ab4454ee1244610b88e623 /libavformat/ingenientdec.c | |
parent | 7effbee66cf457c62f795d9b9ed3a1110b364b89 (diff) | |
download | ffmpeg-8f63f241d499a01d086874af36801167b72b7036.tar.gz |
Remove some useless code that duplicates av_get_packet.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Diffstat (limited to 'libavformat/ingenientdec.c')
-rw-r--r-- | libavformat/ingenientdec.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/libavformat/ingenientdec.c b/libavformat/ingenientdec.c index f16f4690ae..f595a7e87f 100644 --- a/libavformat/ingenientdec.c +++ b/libavformat/ingenientdec.c @@ -44,17 +44,10 @@ static int ingenient_read_packet(AVFormatContext *s, AVPacket *pkt) av_log(s, AV_LOG_DEBUG, "Ingenient packet: size=%d, width=%d, height=%d, unk1=%d unk2=%d\n", size, w, h, unk1, unk2); - if (av_new_packet(pkt, size) < 0) - return AVERROR(ENOMEM); - - pkt->pos = avio_tell(s->pb); - pkt->stream_index = 0; - ret = avio_read(s->pb, pkt->data, size); - if (ret < 0) { - av_free_packet(pkt); + ret = av_get_packet(s->pb, pkt, size); + if (ret < 0) return ret; - } - pkt->size = ret; + pkt->stream_index = 0; return ret; } |