Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
4c76600a
Commit
4c76600a
authored
Apr 05, 2013
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rawdec: make use of AV_OPT_TYPE_VIDEO_RATE
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
3d9a789b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
9 deletions
+3
-9
rawdec.c
libavformat/rawdec.c
+2
-8
rawdec.h
libavformat/rawdec.h
+1
-1
No files found.
libavformat/rawdec.c
View file @
4c76600a
...
...
@@ -70,7 +70,6 @@ int ff_raw_video_read_header(AVFormatContext *s)
{
AVStream
*
st
;
FFRawVideoDemuxerContext
*
s1
=
s
->
priv_data
;
AVRational
framerate
;
int
ret
=
0
;
...
...
@@ -84,12 +83,7 @@ int ff_raw_video_read_header(AVFormatContext *s)
st
->
codec
->
codec_id
=
s
->
iformat
->
raw_codec_id
;
st
->
need_parsing
=
AVSTREAM_PARSE_FULL_RAW
;
if
((
ret
=
av_parse_video_rate
(
&
framerate
,
s1
->
framerate
))
<
0
)
{
av_log
(
s
,
AV_LOG_ERROR
,
"Could not parse framerate: %s.
\n
"
,
s1
->
framerate
);
goto
fail
;
}
st
->
codec
->
time_base
=
av_inv_q
(
framerate
);
st
->
codec
->
time_base
=
av_inv_q
(
s1
->
framerate
);
avpriv_set_pts_info
(
st
,
64
,
1
,
1200000
);
fail:
...
...
@@ -101,7 +95,7 @@ fail:
#define OFFSET(x) offsetof(FFRawVideoDemuxerContext, x)
#define DEC AV_OPT_FLAG_DECODING_PARAM
const
AVOption
ff_rawvideo_options
[]
=
{
{
"framerate"
,
""
,
OFFSET
(
framerate
),
AV_OPT_TYPE_
STRING
,
{.
str
=
"25"
},
0
,
0
,
DEC
},
{
"framerate"
,
""
,
OFFSET
(
framerate
),
AV_OPT_TYPE_
VIDEO_RATE
,
{.
str
=
"25"
},
0
,
0
,
DEC
},
{
NULL
},
};
...
...
libavformat/rawdec.h
View file @
4c76600a
...
...
@@ -30,7 +30,7 @@ typedef struct FFRawVideoDemuxerContext {
const
AVClass
*
class
;
/**< Class for private options. */
char
*
video_size
;
/**< String describing video size, set by a private option. */
char
*
pixel_format
;
/**< Set by a private option. */
char
*
framerate
;
/**< String
describing framerate, set by a private option. */
AVRational
framerate
;
/**< AVRational
describing framerate, set by a private option. */
}
FFRawVideoDemuxerContext
;
extern
const
AVOption
ff_rawvideo_options
[];
...
...
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