Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
da833a6d
Commit
da833a6d
authored
Oct 18, 2014
by
Lukasz Marek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavd/fbdev_dec: use default device when not provided
Signed-off-by:
Lukasz Marek
<
lukasz.m.luki2@gmail.com
>
parent
3099008f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
fbdev_dec.c
libavdevice/fbdev_dec.c
+8
-2
No files found.
libavdevice/fbdev_dec.c
View file @
da833a6d
...
@@ -68,6 +68,7 @@ static av_cold int fbdev_read_header(AVFormatContext *avctx)
...
@@ -68,6 +68,7 @@ static av_cold int fbdev_read_header(AVFormatContext *avctx)
AVStream
*
st
=
NULL
;
AVStream
*
st
=
NULL
;
enum
AVPixelFormat
pix_fmt
;
enum
AVPixelFormat
pix_fmt
;
int
ret
,
flags
=
O_RDONLY
;
int
ret
,
flags
=
O_RDONLY
;
const
char
*
device
;
if
(
!
(
st
=
avformat_new_stream
(
avctx
,
NULL
)))
if
(
!
(
st
=
avformat_new_stream
(
avctx
,
NULL
)))
return
AVERROR
(
ENOMEM
);
return
AVERROR
(
ENOMEM
);
...
@@ -77,11 +78,16 @@ static av_cold int fbdev_read_header(AVFormatContext *avctx)
...
@@ -77,11 +78,16 @@ static av_cold int fbdev_read_header(AVFormatContext *avctx)
if
(
avctx
->
flags
&
AVFMT_FLAG_NONBLOCK
)
if
(
avctx
->
flags
&
AVFMT_FLAG_NONBLOCK
)
flags
|=
O_NONBLOCK
;
flags
|=
O_NONBLOCK
;
if
((
fbdev
->
fd
=
avpriv_open
(
avctx
->
filename
,
flags
))
==
-
1
)
{
if
(
avctx
->
filename
[
0
])
device
=
avctx
->
filename
;
else
device
=
ff_fbdev_default_device
();
if
((
fbdev
->
fd
=
avpriv_open
(
device
,
flags
))
==
-
1
)
{
ret
=
AVERROR
(
errno
);
ret
=
AVERROR
(
errno
);
av_log
(
avctx
,
AV_LOG_ERROR
,
av_log
(
avctx
,
AV_LOG_ERROR
,
"Could not open framebuffer device '%s': %s
\n
"
,
"Could not open framebuffer device '%s': %s
\n
"
,
avctx
->
filenam
e
,
av_err2str
(
ret
));
devic
e
,
av_err2str
(
ret
));
return
ret
;
return
ret
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment