[FFmpeg-cvslog] r14247 - trunk/libavdevice/v4l2.c
stefano
subversion
Tue Jul 15 22:45:42 CEST 2008
Author: stefano
Date: Tue Jul 15 22:45:42 2008
New Revision: 14247
Log:
Make v4l2_read_header() don't free a stream in case of failure when
reading its header. The stream will be freed later in
av_open_input_stream(). Fix a segmentation fault due to a double free
on the same pointer.
Modified:
trunk/libavdevice/v4l2.c
Modified: trunk/libavdevice/v4l2.c
==============================================================================
--- trunk/libavdevice/v4l2.c (original)
+++ trunk/libavdevice/v4l2.c Tue Jul 15 22:45:42 2008
@@ -526,8 +526,6 @@ static int v4l2_read_header(AVFormatCont
capabilities = 0;
s->fd = device_open(s1, &capabilities);
if (s->fd < 0) {
- av_free(st);
-
return AVERROR(EIO);
}
av_log(s1, AV_LOG_INFO, "[%d]Capabilities: %x\n", s->fd, capabilities);
@@ -553,7 +551,6 @@ static int v4l2_read_header(AVFormatCont
if (desired_format == 0) {
av_log(s1, AV_LOG_ERROR, "Cannot find a proper format.\n");
close(s->fd);
- av_free(st);
return AVERROR(EIO);
}
@@ -576,7 +573,6 @@ static int v4l2_read_header(AVFormatCont
}
if (res < 0) {
close(s->fd);
- av_free(st);
return AVERROR(EIO);
}
More information about the ffmpeg-cvslog
mailing list