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
47a79572
Commit
47a79572
authored
Nov 02, 2016
by
Vittorio Giovara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hevc: Support extradata changes from multiple stsd
Signed-off-by:
Vittorio Giovara
<
vittorio.giovara@gmail.com
>
parent
2fe30b47
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
7 deletions
+15
-7
hevcdec.c
libavcodec/hevcdec.c
+10
-0
mov.c
libavformat/mov.c
+5
-7
No files found.
libavcodec/hevcdec.c
View file @
47a79572
...
...
@@ -2774,6 +2774,8 @@ static int hevc_decode_frame(AVCodecContext *avctx, void *data, int *got_output,
AVPacket
*
avpkt
)
{
int
ret
;
int
new_extradata_size
;
uint8_t
*
new_extradata
;
HEVCContext
*
s
=
avctx
->
priv_data
;
if
(
!
avpkt
->
size
)
{
...
...
@@ -2785,6 +2787,14 @@ static int hevc_decode_frame(AVCodecContext *avctx, void *data, int *got_output,
return
0
;
}
new_extradata
=
av_packet_get_side_data
(
avpkt
,
AV_PKT_DATA_NEW_EXTRADATA
,
&
new_extradata_size
);
if
(
new_extradata
&&
new_extradata_size
>
0
)
{
ret
=
hevc_decode_extradata
(
s
,
new_extradata
,
new_extradata_size
);
if
(
ret
<
0
)
return
ret
;
}
s
->
ref
=
NULL
;
ret
=
decode_nal_units
(
s
,
avpkt
->
data
,
avpkt
->
size
);
if
(
ret
<
0
)
...
...
libavformat/mov.c
View file @
47a79572
...
...
@@ -1780,13 +1780,11 @@ static int mov_skip_multiple_stsd(MOVContext *c, AVIOContext *pb,
int
video_codec_id
=
ff_codec_get_id
(
ff_codec_movvideo_tags
,
format
);
if
(
codec_tag
&&
(
codec_tag
==
AV_RL32
(
"hvc1"
)
||
codec_tag
==
AV_RL32
(
"hev1"
)
||
(
codec_tag
!=
format
&&
// prores is allowed to have differing data format and codec tag
codec_tag
!=
AV_RL32
(
"apcn"
)
&&
codec_tag
!=
AV_RL32
(
"apch"
)
&&
(
c
->
fc
->
video_codec_id
?
video_codec_id
!=
c
->
fc
->
video_codec_id
:
codec_tag
!=
MKTAG
(
'j'
,
'p'
,
'e'
,
'g'
)))))
{
(
codec_tag
!=
format
&&
// prores is allowed to have differing data format and codec tag
codec_tag
!=
AV_RL32
(
"apcn"
)
&&
codec_tag
!=
AV_RL32
(
"apch"
)
&&
(
c
->
fc
->
video_codec_id
?
video_codec_id
!=
c
->
fc
->
video_codec_id
:
codec_tag
!=
MKTAG
(
'j'
,
'p'
,
'e'
,
'g'
))))
{
/* Multiple fourcc, we skip JPEG. This is not correct, we should
* export it as a separate AVStream but this needs a few changes
* in the MOV demuxer, patch welcome. */
...
...
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