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
b437cec1
Commit
b437cec1
authored
Sep 21, 2012
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc: ensure extended_data is set properly on decoding
parent
2bc0de38
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
utils.c
libavcodec/utils.c
+14
-0
No files found.
libavcodec/utils.c
View file @
b437cec1
...
...
@@ -1291,6 +1291,10 @@ int attribute_align_arg avcodec_decode_video2(AVCodecContext *avctx, AVFrame *pi
}
else
ret
=
0
;
/* many decoders assign whole AVFrames, thus overwriting extended_data;
* make sure it's set correctly */
picture
->
extended_data
=
picture
->
data
;
return
ret
;
}
...
...
@@ -1347,6 +1351,7 @@ int attribute_align_arg avcodec_decode_audio4(AVCodecContext *avctx,
int
*
got_frame_ptr
,
AVPacket
*
avpkt
)
{
int
planar
,
channels
;
int
ret
=
0
;
*
got_frame_ptr
=
0
;
...
...
@@ -1369,6 +1374,15 @@ int attribute_align_arg avcodec_decode_audio4(AVCodecContext *avctx,
frame
->
format
=
avctx
->
sample_fmt
;
}
}
/* many decoders assign whole AVFrames, thus overwriting extended_data;
* make sure it's set correctly; assume decoders that actually use
* extended_data are doing it correctly */
planar
=
av_sample_fmt_is_planar
(
frame
->
format
);
channels
=
av_get_channel_layout_nb_channels
(
frame
->
channel_layout
);
if
(
!
(
planar
&&
channels
>
AV_NUM_DATA_POINTERS
))
frame
->
extended_data
=
frame
->
data
;
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