summaryrefslogtreecommitdiff
path: root/libavcodec/vda.c
diff options
context:
space:
mode:
authorSebastien Zwickert <dilaroga@free.fr>2011-11-14 21:32:10 +0100
committerSebastien Zwickert <dilaroga@free.fr>2011-11-14 22:24:03 +0100
commit6e1e49385ead7bdc24474fd8b3f435cf6f766cd5 (patch)
treebe648d02eba7e15291d7bbaa8c466155d2d899b0 /libavcodec/vda.c
parenta40867f27b4d042920425130ac58a34c837c6524 (diff)
vda: cosmetic.
Diffstat (limited to 'libavcodec/vda.c')
-rw-r--r--libavcodec/vda.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/libavcodec/vda.c b/libavcodec/vda.c
index c06b55340a..9016768fbf 100644
--- a/libavcodec/vda.c
+++ b/libavcodec/vda.c
@@ -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);