[FFmpeg-devel,2/2] avcodec/videotoolboxenc: reindent after previous commit

Submitted by Thomas Guillem on July 4, 2018, 7:05 a.m.

Details

Message ID 20180704070523.2573-2-thomas@gllm.fr
State New
Headers show

Commit Message

Thomas Guillem July 4, 2018, 7:05 a.m.
---
 libavcodec/videotoolboxenc.c | 72 ++++++++++++++++++------------------
 1 file changed, 36 insertions(+), 36 deletions(-)

Patch hide | download patch | download mbox

diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c
index aa9aae7e05..050e5cefee 100644
--- a/libavcodec/videotoolboxenc.c
+++ b/libavcodec/videotoolboxenc.c
@@ -1020,45 +1020,45 @@  static int vtenc_create_encoder(AVCodecContext   *avctx,
     if (vtctx->codec_id == AV_CODEC_ID_H264) {
         // kVTCompressionPropertyKey_DataRateLimits is not available for HEVC
         if (max_rate > 0) {
-        bytes_per_second_value = max_rate >> 3;
-        bytes_per_second = CFNumberCreate(kCFAllocatorDefault,
-                                          kCFNumberSInt64Type,
-                                          &bytes_per_second_value);
-        if (!bytes_per_second) {
-            return AVERROR(ENOMEM);
-        }
-        one_second_value = 1;
-        one_second = CFNumberCreate(kCFAllocatorDefault,
-                                    kCFNumberSInt64Type,
-                                    &one_second_value);
-        if (!one_second) {
-            CFRelease(bytes_per_second);
-            return AVERROR(ENOMEM);
-        }
-        nums[0] = (void *)bytes_per_second;
-        nums[1] = (void *)one_second;
-        data_rate_limits = CFArrayCreate(kCFAllocatorDefault,
-                                         (const void **)nums,
-                                         2,
-                                         &kCFTypeArrayCallBacks);
-
-        if (!data_rate_limits) {
+            bytes_per_second_value = max_rate >> 3;
+            bytes_per_second = CFNumberCreate(kCFAllocatorDefault,
+                                              kCFNumberSInt64Type,
+                                              &bytes_per_second_value);
+            if (!bytes_per_second) {
+                return AVERROR(ENOMEM);
+            }
+            one_second_value = 1;
+            one_second = CFNumberCreate(kCFAllocatorDefault,
+                                        kCFNumberSInt64Type,
+                                        &one_second_value);
+            if (!one_second) {
+                CFRelease(bytes_per_second);
+                return AVERROR(ENOMEM);
+            }
+            nums[0] = (void *)bytes_per_second;
+            nums[1] = (void *)one_second;
+            data_rate_limits = CFArrayCreate(kCFAllocatorDefault,
+                                             (const void **)nums,
+                                             2,
+                                             &kCFTypeArrayCallBacks);
+
+            if (!data_rate_limits) {
+                CFRelease(bytes_per_second);
+                CFRelease(one_second);
+                return AVERROR(ENOMEM);
+            }
+            status = VTSessionSetProperty(vtctx->session,
+                                          kVTCompressionPropertyKey_DataRateLimits,
+                                          data_rate_limits);
+
             CFRelease(bytes_per_second);
             CFRelease(one_second);
-            return AVERROR(ENOMEM);
-        }
-        status = VTSessionSetProperty(vtctx->session,
-                                      kVTCompressionPropertyKey_DataRateLimits,
-                                      data_rate_limits);
+            CFRelease(data_rate_limits);
 
-        CFRelease(bytes_per_second);
-        CFRelease(one_second);
-        CFRelease(data_rate_limits);
-
-        if (status) {
-            av_log(avctx, AV_LOG_ERROR, "Error setting max bitrate property: %d\n", status);
-            return AVERROR_EXTERNAL;
-        }
+            if (status) {
+                av_log(avctx, AV_LOG_ERROR, "Error setting max bitrate property: %d\n", status);
+                return AVERROR_EXTERNAL;
+            }
         }
 
         if (profile_level) {