Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(596)

Side by Side Diff: media/filters/ffmpeg_aac_bitstream_converter.cc

Issue 2273203003: Fix channel mapping for 8-ch audio in ffmpeg_aac_bitstream_converter (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/filters/ffmpeg_aac_bitstream_converter.h" 5 #include "media/filters/ffmpeg_aac_bitstream_converter.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "media/ffmpeg/ffmpeg_common.h" 8 #include "media/ffmpeg/ffmpeg_common.h"
9 9
10 namespace media { 10 namespace media {
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 // front-center, front-left, front-right, back-left, back-right 109 // front-center, front-left, front-right, back-left, back-right
110 hdr[2] |= 1; 110 hdr[2] |= 1;
111 hdr[3] |= (1 << 6); 111 hdr[3] |= (1 << 6);
112 break; 112 break;
113 case 6: 113 case 6:
114 // front-center, front-left, front-right, back-left, back-right, 114 // front-center, front-left, front-right, back-left, back-right,
115 // LFE-channel 115 // LFE-channel
116 hdr[2] |= 1; 116 hdr[2] |= 1;
117 hdr[3] |= (2 << 6); 117 hdr[3] |= (2 << 6);
118 break; 118 break;
119 case 7: 119 case 8:
120 // front-center, front-left, front-right, side-left, side-right, 120 // front-center, front-left, front-right, side-left, side-right,
121 // back-left, back-right, LFE-channel 121 // back-left, back-right, LFE-channel
122 hdr[2] |= 1; 122 hdr[2] |= 1;
123 hdr[3] |= (3 << 6); 123 hdr[3] |= (3 << 6);
124 break; 124 break;
125 default: 125 default:
126 DLOG(ERROR) << "[" << __FUNCTION__ << "] " 126 DLOG(ERROR) << "[" << __FUNCTION__ << "] "
127 << "unsupported number of audio channels:" 127 << "unsupported number of audio channels:"
128 << channel_configuration; 128 << channel_configuration;
129 return false; 129 return false;
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 av_packet_copy_props(&dest_packet, packet); 240 av_packet_copy_props(&dest_packet, packet);
241 241
242 // Release the old packet. 242 // Release the old packet.
243 av_packet_unref(packet); 243 av_packet_unref(packet);
244 *packet = dest_packet; // Finally, replace the values in the input packet. 244 *packet = dest_packet; // Finally, replace the values in the input packet.
245 245
246 return true; 246 return true;
247 } 247 }
248 248
249 } // namespace media 249 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698