]> git.sesse.net Git - ffmpeg/commitdiff
swresample/matrix: switch internal clean_layout function to not drop high bits
authorJan Ekström <jeebjp@gmail.com>
Fri, 31 Jul 2020 22:52:08 +0000 (01:52 +0300)
committerJan Ekström <jeebjp@gmail.com>
Mon, 3 Aug 2020 21:17:56 +0000 (00:17 +0300)
These bits are utilized by channel layouts such as 22.2. If those
are dropped, the returned channel layout is no longer a match
against the AV_CH_LAYOUT define when returned from this function.

libswresample/rematrix.c

index 6b5feaa07b69e408cd99b2ba0613786656bc4c54..983355ba364de044269eab6dc65fa335f1df2c05 100644 (file)
@@ -88,7 +88,7 @@ static int even(int64_t layout){
     return 0;
 }
 
-static int clean_layout(void *s, int64_t layout){
+static int64_t clean_layout(void *s, int64_t layout){
     if(layout && layout != AV_CH_FRONT_CENTER && !(layout&(layout-1))) {
         char buf[128];
         av_get_channel_layout_string(buf, sizeof(buf), -1, layout);