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
3e53211a
Commit
3e53211a
authored
Apr 02, 2015
by
Rainer Hochecker
Committed by
Michael Niedermayer
Apr 02, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vda: fix h264 decoding for avcC,vda wants the entire buffer
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
764f87b6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
4 deletions
+18
-4
h264.c
libavcodec/h264.c
+1
-1
vda_h264.c
libavcodec/vda_h264.c
+17
-3
No files found.
libavcodec/h264.c
View file @
3e53211a
...
...
@@ -1588,7 +1588,7 @@ again:
decode_postinit
(
h
,
nal_index
>=
nals_needed
);
if
(
h
->
avctx
->
hwaccel
&&
(
ret
=
h
->
avctx
->
hwaccel
->
start_frame
(
h
->
avctx
,
NULL
,
0
))
<
0
)
(
ret
=
h
->
avctx
->
hwaccel
->
start_frame
(
h
->
avctx
,
buf
,
buf_size
))
<
0
)
return
ret
;
if
(
CONFIG_H264_VDPAU_DECODER
&&
h
->
avctx
->
codec
->
capabilities
&
CODEC_CAP_HWACCEL_VDPAU
)
...
...
libavcodec/vda_h264.c
View file @
3e53211a
...
...
@@ -320,9 +320,20 @@ static int vda_h264_start_frame(AVCodecContext *avctx,
uint32_t
size
)
{
VDAContext
*
vda
=
avctx
->
internal
->
hwaccel_priv_data
;
vda
->
bitstream_size
=
0
;
H264Context
*
h
=
avctx
->
priv_data
;
if
(
h
->
is_avc
==
1
)
{
void
*
tmp
;
vda
->
bitstream_size
=
0
;
tmp
=
av_fast_realloc
(
vda
->
bitstream
,
&
vda
->
allocated_size
,
size
);
vda
->
bitstream
=
tmp
;
memcpy
(
vda
->
bitstream
,
buffer
,
size
);
vda
->
bitstream_size
=
size
;
}
else
{
vda
->
bitstream_size
=
0
;
}
return
0
;
}
...
...
@@ -333,6 +344,9 @@ static int vda_h264_decode_slice(AVCodecContext *avctx,
VDAContext
*
vda
=
avctx
->
internal
->
hwaccel_priv_data
;
void
*
tmp
;
if
(
h
->
is_avc
==
1
)
return
0
;
tmp
=
av_fast_realloc
(
vda
->
bitstream
,
&
vda
->
allocated_size
,
vda
->
bitstream_size
+
size
+
4
);
...
...
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