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
6e1e4938
Commit
6e1e4938
authored
Nov 14, 2011
by
Sebastien Zwickert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vda: cosmetic.
parent
a40867f2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
17 deletions
+17
-17
vda.c
libavcodec/vda.c
+17
-17
No files found.
libavcodec/vda.c
View file @
6e1e4938
...
...
@@ -78,7 +78,7 @@ static int64_t vda_pts_from_dictionary(CFDictionaryRef user_info)
CFNumberRef
pts
;
int64_t
outValue
=
0
;
if
(
NULL
==
user_info
)
if
(
!
user_info
)
return
0
;
pts
=
CFDictionaryGetValue
(
user_info
,
CFSTR
(
"FF_VDA_DECODER_PTS_KEY"
));
...
...
@@ -96,7 +96,7 @@ static void vda_clear_queue(struct vda_context *vda_ctx)
vda_lock_operation
(
&
vda_ctx
->
queue_mutex
,
AV_LOCK_OBTAIN
);
while
(
vda_ctx
->
queue
!=
NULL
)
while
(
vda_ctx
->
queue
)
{
top_frame
=
vda_ctx
->
queue
;
vda_ctx
->
queue
=
top_frame
->
next_frame
;
...
...
@@ -118,7 +118,7 @@ static void vda_decoder_callback (void *vda_hw_ctx,
vda_frame
*
new_frame
;
vda_frame
*
queue_walker
;
if
(
NULL
==
image_buffer
)
if
(
!
image_buffer
)
return
;
if
(
vda_ctx
->
cv_pix_fmt_type
!=
CVPixelBufferGetPixelFormatType
(
image_buffer
))
...
...
@@ -183,10 +183,10 @@ int ff_vda_create_decoder(struct vda_context *vda_ctx,
vda_lock_operation
(
&
vda_ctx
->
queue_mutex
,
AV_LOCK_CREATE
);
config_info
=
(
CFDictionaryCreateMutable
(
kCFAllocatorDefault
,
4
,
&
kCFTypeDictionaryKeyCallBacks
,
&
kCFTypeDictionaryValueCallBacks
)
);
config_info
=
CFDictionaryCreateMutable
(
kCFAllocatorDefault
,
4
,
&
kCFTypeDictionaryKeyCallBacks
,
&
kCFTypeDictionaryValueCallBacks
);
height
=
CFNumberCreate
(
kCFAllocatorDefault
,
kCFNumberSInt32Type
,
&
vda_ctx
->
height
);
width
=
CFNumberCreate
(
kCFAllocatorDefault
,
kCFNumberSInt32Type
,
&
vda_ctx
->
width
);
...
...
@@ -198,14 +198,14 @@ int ff_vda_create_decoder(struct vda_context *vda_ctx,
CFDictionarySetValue
(
config_info
,
kVDADecoderConfiguration_SourceFormat
,
format
);
CFDictionarySetValue
(
config_info
,
kVDADecoderConfiguration_avcCData
,
avc_data
);
buffer_attributes
=
(
CFDictionaryCreateMutable
(
kCFAllocatorDefault
,
2
,
&
kCFTypeDictionaryKeyCallBacks
,
&
kCFTypeDictionaryValueCallBacks
)
);
io_surface_properties
=
(
CFDictionaryCreateMutable
(
kCFAllocatorDefault
,
0
,
&
kCFTypeDictionaryKeyCallBacks
,
&
kCFTypeDictionaryValueCallBacks
)
);
buffer_attributes
=
CFDictionaryCreateMutable
(
kCFAllocatorDefault
,
2
,
&
kCFTypeDictionaryKeyCallBacks
,
&
kCFTypeDictionaryValueCallBacks
);
io_surface_properties
=
CFDictionaryCreateMutable
(
kCFAllocatorDefault
,
0
,
&
kCFTypeDictionaryKeyCallBacks
,
&
kCFTypeDictionaryValueCallBacks
);
cv_pix_fmt
=
CFNumberCreate
(
kCFAllocatorDefault
,
kCFNumberSInt32Type
,
&
vda_ctx
->
cv_pix_fmt_type
);
...
...
@@ -246,7 +246,7 @@ int ff_vda_destroy_decoder(struct vda_context *vda_ctx)
vda_clear_queue
(
vda_ctx
);
if
(
vda_ctx
->
queue_mutex
!=
NULL
)
if
(
vda_ctx
->
queue_mutex
)
vda_lock_operation
(
&
vda_ctx
->
queue_mutex
,
AV_LOCK_DESTROY
);
if
(
vda_ctx
->
bitstream
)
...
...
@@ -275,7 +275,7 @@ vda_frame *ff_vda_queue_pop(struct vda_context *vda_ctx)
void
ff_vda_release_vda_frame
(
vda_frame
*
frame
)
{
if
(
frame
!=
NULL
)
if
(
frame
)
{
CVPixelBufferRelease
(
frame
->
cv_buffer
);
av_freep
(
&
frame
);
...
...
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