avcodecmap: Correctly convert GStreamer channel positions to libav channel mask
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Mon, 17 Dec 2012 12:41:42 +0000 (13:41 +0100)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Mon, 17 Dec 2012 12:41:42 +0000 (13:41 +0100)
ext/libav/gstavcodecmap.c

index 989efc8..d4ed1ca 100644 (file)
@@ -80,7 +80,7 @@ gst_ffmpeg_channel_positions_to_layout (GstAudioChannelPosition * pos,
   for (i = 0; i < channels; i++) {
     for (j = 0; j < G_N_ELEMENTS (_ff_to_gst_layout); j++) {
       if (_ff_to_gst_layout[j].gst == pos[i]) {
-        ret |= _ff_to_gst_layout[i].ff;
+        ret |= _ff_to_gst_layout[j].ff;
         channels_found++;
         break;
       }