summaryrefslogtreecommitdiff
path: root/libavdevice
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2011-06-05 13:18:17 +0200
committerAnton Khirnov <anton@khirnov.net>2011-06-05 15:01:36 +0200
commit367732832faaf1bac4ece37cf7fef8c911e16312 (patch)
tree3e3cf5d1809f898f9f25dca63b2e2f8117424bde /libavdevice
parentb39b06233dfd69b941a32f29171dfb63abb23c06 (diff)
lavf,lavc: free avoptions in a generic way.
It's simpler and less error-prone. Fixes some memleaks along the way.
Diffstat (limited to 'libavdevice')
-rw-r--r--libavdevice/bktr.c2
-rw-r--r--libavdevice/fbdev.c1
-rw-r--r--libavdevice/libdc1394.c3
-rw-r--r--libavdevice/v4l2.c4
-rw-r--r--libavdevice/vfwcap.c3
-rw-r--r--libavdevice/x11grab.c2
6 files changed, 0 insertions, 15 deletions
diff --git a/libavdevice/bktr.c b/libavdevice/bktr.c
index 6e19a61103..4d3933f4e9 100644
--- a/libavdevice/bktr.c
+++ b/libavdevice/bktr.c
@@ -320,8 +320,6 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
last_frame_time = 0;
out:
- av_freep(&s->video_size);
- av_freep(&s->framerate);
return ret;
}
diff --git a/libavdevice/fbdev.c b/libavdevice/fbdev.c
index 7e9ffe5c77..afd6b94ed0 100644
--- a/libavdevice/fbdev.c
+++ b/libavdevice/fbdev.c
@@ -103,7 +103,6 @@ av_cold static int fbdev_read_header(AVFormatContext *avctx,
int ret, flags = O_RDONLY;
ret = av_parse_video_rate(&fbdev->fps, fbdev->framerate);
- av_freep(&fbdev->framerate);
if (ret < 0) {
av_log(avctx, AV_LOG_ERROR, "Couldn't parse framerate.\n");
return ret;
diff --git a/libavdevice/libdc1394.c b/libavdevice/libdc1394.c
index b17d0fb441..622579bc92 100644
--- a/libavdevice/libdc1394.c
+++ b/libavdevice/libdc1394.c
@@ -195,9 +195,6 @@ static inline int dc1394_read_common(AVFormatContext *c, AVFormatParameters *ap,
*select_fps = fps;
*select_fmt = fmt;
out:
- av_freep(&dc1394->video_size);
- av_freep(&dc1394->pixel_format);
- av_freep(&dc1394->framerate);
return ret;
}
diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index 98ff82ec0d..839d290b63 100644
--- a/libavdevice/v4l2.c
+++ b/libavdevice/v4l2.c
@@ -684,10 +684,6 @@ static int v4l2_read_header(AVFormatContext *s1, AVFormatParameters *ap)
st->codec->bit_rate = s->frame_size * 1/av_q2d(st->codec->time_base) * 8;
out:
- av_freep(&s->video_size);
- av_freep(&s->pixel_format);
- av_freep(&s->standard);
- av_freep(&s->framerate);
return res;
}
diff --git a/libavdevice/vfwcap.c b/libavdevice/vfwcap.c
index 5dd873bdcb..95dd4c34b8 100644
--- a/libavdevice/vfwcap.c
+++ b/libavdevice/vfwcap.c
@@ -234,9 +234,6 @@ static int vfw_read_close(AVFormatContext *s)
pktl = next;
}
- av_freep(&ctx->video_size);
- av_freep(&ctx->framerate);
-
return 0;
}
diff --git a/libavdevice/x11grab.c b/libavdevice/x11grab.c
index b1ca6e699a..c6dc673520 100644
--- a/libavdevice/x11grab.c
+++ b/libavdevice/x11grab.c
@@ -258,8 +258,6 @@ x11grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
st->codec->bit_rate = x11grab->frame_size * 1/av_q2d(x11grab->time_base) * 8;
out:
- av_freep(&x11grab->video_size);
- av_freep(&x11grab->framerate);
return ret;
}