[FFmpeg-devel] [PATCH 13/15] avformat/pcmdec: Reindent after the previous commit

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Sat Mar 23 04:06:21 EET 2024


Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
 libavformat/pcmdec.c | 52 ++++++++++++++++++++++----------------------
 1 file changed, 26 insertions(+), 26 deletions(-)

diff --git a/libavformat/pcmdec.c b/libavformat/pcmdec.c
index 03feefb5bb..e95a08df4b 100644
--- a/libavformat/pcmdec.c
+++ b/libavformat/pcmdec.c
@@ -51,33 +51,33 @@ static int pcm_handle_mime_type(AVFormatContext *s, const char *prefix,
     if (!av_stristart(mime_type, prefix, &options)) /* audio/L16 */
         goto end;
 
-            while (options = strchr(options, ';')) {
-                options++;
-                if (!rate)
-                    sscanf(options, " rate=%d",     &rate);
-                if (!channels)
-                    sscanf(options, " channels=%d", &channels);
-                if (!little_endian) {
-                     char val[sizeof("little-endian")];
-                     if (sscanf(options, " endianness=%13s", val) == 1) {
-                         little_endian = strcmp(val, "little-endian") == 0;
-                     }
-                }
+    while (options = strchr(options, ';')) {
+        options++;
+        if (!rate)
+            sscanf(options, " rate=%d",     &rate);
+        if (!channels)
+            sscanf(options, " channels=%d", &channels);
+        if (!little_endian) {
+            char val[sizeof("little-endian")];
+            if (sscanf(options, " endianness=%13s", val) == 1) {
+                little_endian = strcmp(val, "little-endian") == 0;
             }
-            if (rate <= 0) {
-                av_log(s, AV_LOG_ERROR,
-                       "Invalid sample_rate found in mime_type \"%s\"\n",
-                       mime_type);
-                av_freep(&mime_type);
-                return AVERROR_INVALIDDATA;
-            }
-            par->sample_rate = rate;
-            if (channels > 0) {
-                av_channel_layout_uninit(&par->ch_layout);
-                par->ch_layout.nb_channels = channels;
-            }
-            if (little_endian)
-                par->codec_id = AV_CODEC_ID_PCM_S16LE;
+        }
+    }
+    if (rate <= 0) {
+        av_log(s, AV_LOG_ERROR,
+               "Invalid sample_rate found in mime_type \"%s\"\n",
+               mime_type);
+        av_freep(&mime_type);
+        return AVERROR_INVALIDDATA;
+    }
+    par->sample_rate = rate;
+    if (channels > 0) {
+        av_channel_layout_uninit(&par->ch_layout);
+        par->ch_layout.nb_channels = channels;
+    }
+    if (little_endian)
+        par->codec_id = AV_CODEC_ID_PCM_S16LE;
 
 end:
     av_freep(&mime_type);
-- 
2.40.1



More information about the ffmpeg-devel mailing list