Skip to content

Commit

Permalink
Fix "Could not find v4l2 muxer"
Browse files Browse the repository at this point in the history
The AVOutputFormat name is a comma-separated list. In theory, possible
names for V4L2 are:

    - "video4linux2,v4l2"
    - "v4l2,video4linux2"
    - "v4l2"
    - "video4linux2"

To find the muxer in all cases, we must request exactly one muxer name
at a time.

PR #2718 <#2718>

Co-authored-by: Romain Vimont <rom@rom1v.com>
Signed-off-by: Romain Vimont <rom@rom1v.com>
  • Loading branch information
prife and rom1v committed Oct 21, 2021
1 parent 07d75eb commit 46d3e35
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/src/v4l2_sink.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,11 @@ sc_v4l2_sink_open(struct sc_v4l2_sink *vs) {
goto error_mutex_destroy;
}

// FIXME
const AVOutputFormat *format = find_muxer("video4linux2,v4l2");
const AVOutputFormat *format = find_muxer("v4l2");
if (!format) {
// Alternative name
format = find_muxer("video4linux2");
}
if (!format) {
LOGE("Could not find v4l2 muxer");
goto error_cond_destroy;
Expand Down

0 comments on commit 46d3e35

Please sign in to comment.