diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2014-10-29 17:02:27 +0000 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2014-10-29 17:02:27 +0000 |
commit | 84bf64d3598c98a748e609195358ea04b0cfd140 (patch) | |
tree | 13d4ae1755487e16f9dc892aae00bef7b08e31de /libavformat/bethsoftvid.c | |
parent | e9ba3098319f78c91470c05da988d865491852c5 (diff) | |
download | ffmpeg-84bf64d3598c98a748e609195358ea04b0cfd140.tar.gz |
bethsoftvid: simplify return handling
Fixes a double free in case of av_packet_new_side_data() failure.
Diffstat (limited to 'libavformat/bethsoftvid.c')
-rw-r--r-- | libavformat/bethsoftvid.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/libavformat/bethsoftvid.c b/libavformat/bethsoftvid.c index 85abf2515b..135a3c491a 100644 --- a/libavformat/bethsoftvid.c +++ b/libavformat/bethsoftvid.c @@ -177,7 +177,6 @@ static int read_frame(BVID_DemuxContext *vid, AVIOContext *pb, AVPacket *pkt, if ((ret = av_new_packet(pkt, vidbuf_nbytes)) < 0) goto fail; memcpy(pkt->data, vidbuf_start, vidbuf_nbytes); - av_free(vidbuf_start); pkt->pos = position; pkt->stream_index = vid->video_index; @@ -198,7 +197,6 @@ static int read_frame(BVID_DemuxContext *vid, AVIOContext *pb, AVPacket *pkt, } vid->nframes--; // used to check if all the frames were read - return 0; fail: av_free(vidbuf_start); return ret; |