[FFmpeg-cvslog] avdevice/iec61883: Use av_freep(), avoid leaving stale pointers in memory
Michael Niedermayer
git at videolan.org
Sat Nov 22 19:02:37 CET 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Nov 22 18:44:35 2014 +0100| [8e6a44cfc5ecceb12b8eed11d51574bb22855570] | committer: Michael Niedermayer
avdevice/iec61883: Use av_freep(), avoid leaving stale pointers in memory
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8e6a44cfc5ecceb12b8eed11d51574bb22855570
---
libavdevice/iec61883.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/libavdevice/iec61883.c b/libavdevice/iec61883.c
index 6d5ec4a..0900ffa 100644
--- a/libavdevice/iec61883.c
+++ b/libavdevice/iec61883.c
@@ -219,8 +219,8 @@ static int iec61883_parse_queue_hdv(struct iec61883_data *dv, AVPacket *pkt)
size = avpriv_mpegts_parse_packet(dv->mpeg_demux, pkt, packet->buf,
packet->len);
dv->queue_first = packet->next;
- av_free(packet->buf);
- av_free(packet);
+ av_freep(&packet->buf);
+ av_freep(&packet);
dv->packets--;
if (size > 0)
@@ -455,8 +455,8 @@ static int iec61883_close(AVFormatContext *context)
while (dv->queue_first) {
DVPacket *packet = dv->queue_first;
dv->queue_first = packet->next;
- av_free(packet->buf);
- av_free(packet);
+ av_freep(&packet->buf);
+ av_freep(&packet);
}
iec61883_cmp_disconnect(dv->raw1394, dv->node, dv->output_port,
More information about the ffmpeg-cvslog
mailing list