diff options
author | R. Brian Anderson <andersrb@cliftonlabs.com> | 2006-06-15 15:15:20 +0000 |
---|---|---|
committer | Luca Abeni <lucabe72@email.it> | 2006-06-15 15:15:20 +0000 |
commit | eaddc4717bd6e295e9d8c140fb9fb8a4c6b60fb8 (patch) | |
tree | f4cba781964e38406e15717bec1b0a49336941bd /libavformat/v4l2.c | |
parent | 1449b7220d7de0cb6e6fc0f3fbf182a3c0e59cd3 (diff) | |
download | ffmpeg-eaddc4717bd6e295e9d8c140fb9fb8a4c6b60fb8.tar.gz |
Fix segfault
Patch by R. Brian Anderson (andersrb AT cliftonlabs DOT com)
Originally committed as revision 5480 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/v4l2.c')
-rw-r--r-- | libavformat/v4l2.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/v4l2.c b/libavformat/v4l2.c index 7404ef5124..3a2ad1fbac 100644 --- a/libavformat/v4l2.c +++ b/libavformat/v4l2.c @@ -457,7 +457,9 @@ static int v4l2_read_header(AVFormatContext *s1, AVFormatParameters *ap) if (capabilities & V4L2_CAP_STREAMING) { s->io_method = io_mmap; res = mmap_init(s); - res = mmap_start(s); + if (res == 0) { + res = mmap_start(s); + } } else { s->io_method = io_read; res = read_init(s); |