diff options
author | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2013-10-22 18:46:37 +0100 |
---|---|---|
committer | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2013-10-27 19:14:23 +0000 |
commit | 6ef30976e00a07ed7c6db54102d2ba50d24c876c (patch) | |
tree | ec4f00cf039688f9bb35f6e475dbc3327c32a76d /libavdevice/v4l2.c | |
parent | fc7be7ddf3dea2f95d2d8bedde2fed44b4f469f2 (diff) | |
download | ffmpeg-6ef30976e00a07ed7c6db54102d2ba50d24c876c.tar.gz |
timefilter: Handle memory allocation failure
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diffstat (limited to 'libavdevice/v4l2.c')
-rw-r--r-- | libavdevice/v4l2.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c index 1b2ede4a22..cb962b7be7 100644 --- a/libavdevice/v4l2.c +++ b/libavdevice/v4l2.c @@ -455,6 +455,8 @@ static int init_convert_timestamp(AVFormatContext *ctx, int64_t ts) av_log(ctx, AV_LOG_INFO, "Detected monotonic timestamps, converting\n"); /* microseconds instead of seconds, MHz instead of Hz */ s->timefilter = ff_timefilter_new(1, period, 1.0E-6); + if (!s->timefilter) + return AVERROR(ENOMEM); s->ts_mode = V4L_TS_CONVERT_READY; return 0; } |