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
abda15a9
Commit
abda15a9
authored
Jul 04, 2014
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cdg: set the keyframe flag on the first packet
Bug-Id: 55
parent
18fb38fb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
cdg.c
libavformat/cdg.c
+11
-0
No files found.
libavformat/cdg.c
View file @
abda15a9
...
...
@@ -26,6 +26,10 @@
#define CDG_COMMAND 0x09
#define CDG_MASK 0x3F
typedef
struct
CDGContext
{
int
got_first_packet
;
}
CDGContext
;
static
int
read_header
(
AVFormatContext
*
s
)
{
AVStream
*
vst
;
...
...
@@ -50,6 +54,7 @@ static int read_header(AVFormatContext *s)
static
int
read_packet
(
AVFormatContext
*
s
,
AVPacket
*
pkt
)
{
CDGContext
*
priv
=
s
->
priv_data
;
int
ret
;
while
(
1
)
{
...
...
@@ -59,6 +64,11 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt)
av_free_packet
(
pkt
);
}
if
(
!
priv
->
got_first_packet
)
{
pkt
->
flags
|=
AV_PKT_FLAG_KEY
;
priv
->
got_first_packet
=
1
;
}
pkt
->
stream_index
=
0
;
return
ret
;
}
...
...
@@ -66,6 +76,7 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt)
AVInputFormat
ff_cdg_demuxer
=
{
.
name
=
"cdg"
,
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"CD Graphics"
),
.
priv_data_size
=
sizeof
(
CDGContext
),
.
read_header
=
read_header
,
.
read_packet
=
read_packet
,
.
extensions
=
"cdg"
,
...
...
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