[FFmpeg-cvslog] vda: cosmetic.

Sebastien Zwickert git at videolan.org
Mon Nov 14 23:23:23 CET 2011


ffmpeg | branch: master | Sebastien Zwickert <dilaroga at free.fr> | Mon Nov 14 21:32:10 2011 +0100| [6e1e49385ead7bdc24474fd8b3f435cf6f766cd5] | committer: Sebastien Zwickert

vda: cosmetic.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6e1e49385ead7bdc24474fd8b3f435cf6f766cd5
---

 libavcodec/vda.c |   34 +++++++++++++++++-----------------
 1 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/libavcodec/vda.c b/libavcodec/vda.c
index c06b553..9016768 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);



More information about the ffmpeg-cvslog mailing list