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
b885d9ce
Commit
b885d9ce
authored
Nov 20, 2015
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/rsd: implement seeking
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
9b7d39de
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
rsd.c
libavformat/rsd.c
+7
-0
No files found.
libavformat/rsd.c
View file @
b885d9ce
...
@@ -171,10 +171,12 @@ static int rsd_read_packet(AVFormatContext *s, AVPacket *pkt)
...
@@ -171,10 +171,12 @@ static int rsd_read_packet(AVFormatContext *s, AVPacket *pkt)
{
{
AVCodecContext
*
codec
=
s
->
streams
[
0
]
->
codec
;
AVCodecContext
*
codec
=
s
->
streams
[
0
]
->
codec
;
int
ret
,
size
=
1024
;
int
ret
,
size
=
1024
;
int64_t
pos
;
if
(
avio_feof
(
s
->
pb
))
if
(
avio_feof
(
s
->
pb
))
return
AVERROR_EOF
;
return
AVERROR_EOF
;
pos
=
avio_tell
(
s
->
pb
);
if
(
codec
->
codec_id
==
AV_CODEC_ID_ADPCM_IMA_RAD
||
if
(
codec
->
codec_id
==
AV_CODEC_ID_ADPCM_IMA_RAD
||
codec
->
codec_id
==
AV_CODEC_ID_ADPCM_PSX
||
codec
->
codec_id
==
AV_CODEC_ID_ADPCM_PSX
||
codec
->
codec_id
==
AV_CODEC_ID_ADPCM_IMA_WAV
||
codec
->
codec_id
==
AV_CODEC_ID_ADPCM_IMA_WAV
||
...
@@ -198,6 +200,10 @@ static int rsd_read_packet(AVFormatContext *s, AVPacket *pkt)
...
@@ -198,6 +200,10 @@ static int rsd_read_packet(AVFormatContext *s, AVPacket *pkt)
ret
=
av_get_packet
(
s
->
pb
,
pkt
,
size
);
ret
=
av_get_packet
(
s
->
pb
,
pkt
,
size
);
}
}
if
(
codec
->
codec_id
==
AV_CODEC_ID_XMA2
&&
pkt
->
size
>=
1
)
pkt
->
duration
=
(
pkt
->
data
[
0
]
>>
2
)
*
512
;
pkt
->
pos
=
pos
;
pkt
->
stream_index
=
0
;
pkt
->
stream_index
=
0
;
return
ret
;
return
ret
;
...
@@ -211,4 +217,5 @@ AVInputFormat ff_rsd_demuxer = {
...
@@ -211,4 +217,5 @@ AVInputFormat ff_rsd_demuxer = {
.
read_packet
=
rsd_read_packet
,
.
read_packet
=
rsd_read_packet
,
.
extensions
=
"rsd"
,
.
extensions
=
"rsd"
,
.
codec_tag
=
(
const
AVCodecTag
*
const
[]){
rsd_tags
,
0
},
.
codec_tag
=
(
const
AVCodecTag
*
const
[]){
rsd_tags
,
0
},
.
flags
=
AVFMT_GENERIC_INDEX
,
};
};
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