Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
202c2acc
Commit
202c2acc
authored
Mar 09, 2013
by
Luca Barbato
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vda: remove async decoder leftovers
Signed-off-by:
Luca Barbato
<
lu_zero@gentoo.org
>
parent
a2816230
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
44 deletions
+3
-44
vda_h264.c
libavcodec/vda_h264.c
+3
-44
No files found.
libavcodec/vda_h264.c
View file @
202c2acc
...
@@ -43,42 +43,7 @@ static void vda_decoder_callback(void *vda_hw_ctx,
...
@@ -43,42 +43,7 @@ static void vda_decoder_callback(void *vda_hw_ctx,
if
(
vda_ctx
->
cv_pix_fmt_type
!=
CVPixelBufferGetPixelFormatType
(
image_buffer
))
if
(
vda_ctx
->
cv_pix_fmt_type
!=
CVPixelBufferGetPixelFormatType
(
image_buffer
))
return
;
return
;
if
(
vda_ctx
->
use_sync_decoding
)
{
vda_ctx
->
cv_buffer
=
CVPixelBufferRetain
(
image_buffer
);
vda_ctx
->
cv_buffer
=
CVPixelBufferRetain
(
image_buffer
);
}
else
{
vda_frame
*
new_frame
;
vda_frame
*
queue_walker
;
if
(
!
(
new_frame
=
av_mallocz
(
sizeof
(
*
new_frame
))))
return
;
new_frame
->
next_frame
=
NULL
;
new_frame
->
cv_buffer
=
CVPixelBufferRetain
(
image_buffer
);
new_frame
->
pts
=
vda_pts_from_dictionary
(
user_info
);
pthread_mutex_lock
(
&
vda_ctx
->
queue_mutex
);
queue_walker
=
vda_ctx
->
queue
;
if
(
!
queue_walker
||
new_frame
->
pts
<
queue_walker
->
pts
)
{
/* we have an empty queue, or this frame earlier than the current queue head */
new_frame
->
next_frame
=
queue_walker
;
vda_ctx
->
queue
=
new_frame
;
}
else
{
/* walk the queue and insert this frame where it belongs in display order */
vda_frame
*
next_frame
;
while
(
1
)
{
next_frame
=
queue_walker
->
next_frame
;
if
(
!
next_frame
||
new_frame
->
pts
<
next_frame
->
pts
)
{
new_frame
->
next_frame
=
next_frame
;
queue_walker
->
next_frame
=
new_frame
;
break
;
}
queue_walker
=
next_frame
;
}
}
pthread_mutex_unlock
(
&
vda_ctx
->
queue_mutex
);
}
}
}
static
int
vda_sync_decode
(
struct
vda_context
*
vda_ctx
)
static
int
vda_sync_decode
(
struct
vda_context
*
vda_ctx
)
...
@@ -152,14 +117,8 @@ static int vda_h264_end_frame(AVCodecContext *avctx)
...
@@ -152,14 +117,8 @@ static int vda_h264_end_frame(AVCodecContext *avctx)
if
(
!
vda_ctx
->
decoder
||
!
vda_ctx
->
priv_bitstream
)
if
(
!
vda_ctx
->
decoder
||
!
vda_ctx
->
priv_bitstream
)
return
-
1
;
return
-
1
;
if
(
vda_ctx
->
use_sync_decoding
)
{
status
=
vda_sync_decode
(
vda_ctx
);
status
=
vda_sync_decode
(
vda_ctx
);
frame
->
data
[
3
]
=
(
void
*
)
vda_ctx
->
cv_buffer
;
frame
->
data
[
3
]
=
(
void
*
)
vda_ctx
->
cv_buffer
;
}
else
{
status
=
vda_decoder_decode
(
vda_ctx
,
vda_ctx
->
priv_bitstream
,
vda_ctx
->
priv_bitstream_size
,
frame
->
reordered_opaque
);
}
if
(
status
)
if
(
status
)
av_log
(
avctx
,
AV_LOG_ERROR
,
"Failed to decode frame (%d)
\n
"
,
status
);
av_log
(
avctx
,
AV_LOG_ERROR
,
"Failed to decode frame (%d)
\n
"
,
status
);
...
...
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