diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-10-29 02:01:10 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-10-29 02:54:46 +0100 |
commit | 5b864470808a352ff7ccfbe44eae3eeae2cccd6e (patch) | |
tree | dad323850dd8c035d738d5bf22d7ffcdcd02c608 /libavdevice/v4l2.c | |
parent | f3c0e0bf6f53df0977f3878d4f5cec99dff8de9e (diff) | |
parent | 238ed47faeadf4ed0008da774cf61d6b224e4254 (diff) | |
download | ffmpeg-5b864470808a352ff7ccfbe44eae3eeae2cccd6e.tar.gz |
Merge remote-tracking branch 'cehoyos/master'
* cehoyos/master:
Mention in the documentation that fieldmatch needs cfr input.
Use v4l2 input format automatically if filename starts with "/dev/video"
Print a warning if a subtitle demuxer changes utf16 to utf8.
Do not set the lame quality if the user didn't request it.
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavdevice/v4l2.c')
-rw-r--r-- | libavdevice/v4l2.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c index cf7a92cdd4..59bb78b13c 100644 --- a/libavdevice/v4l2.c +++ b/libavdevice/v4l2.c @@ -806,6 +806,13 @@ static int device_try_init(AVFormatContext *ctx, return ret; } +static int v4l2_read_probe(AVProbeData *p) +{ + if (av_strstart(p->filename, "/dev/video", NULL)) + return AVPROBE_SCORE_MAX - 1; + return 0; +} + static int v4l2_read_header(AVFormatContext *ctx) { struct video_data *s = ctx->priv_data; @@ -1033,6 +1040,7 @@ AVInputFormat ff_v4l2_demuxer = { .name = "video4linux2,v4l2", .long_name = NULL_IF_CONFIG_SMALL("Video4Linux2 device grab"), .priv_data_size = sizeof(struct video_data), + .read_probe = v4l2_read_probe, .read_header = v4l2_read_header, .read_packet = v4l2_read_packet, .read_close = v4l2_read_close, |