~ubuntu-branches/ubuntu/trusty/gst-libav1.0/trusty-proposed

« back to all changes in this revision

Viewing changes to gst-libs/ext/libav/libavcodec/ac3_parser.c

  • Committer: Package Import Robot
  • Author(s): Sebastian Dröge
  • Date: 2013-09-24 17:07:00 UTC
  • mfrom: (1.1.17) (7.1.9 experimental)
  • Revision ID: package-import@ubuntu.com-20130924170700-4dg62s3pwl0pdakz
Tags: 1.2.0-1
* New upstream stable release:
  + debian/control:
    - Build depend on GStreamer and gst-plugins-base >= 1.2.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21
21
 */
22
22
 
 
23
#include "libavutil/channel_layout.h"
23
24
#include "parser.h"
24
25
#include "ac3_parser.h"
25
26
#include "aac_ac3_parser.h"
26
27
#include "get_bits.h"
27
 
#include "libavutil/audioconvert.h"
28
28
 
29
29
 
30
30
#define AC3_HEADER_SIZE 7
167
167
    if (hdr.bitstream_mode == 0x7 && hdr.channels > 1)
168
168
        hdr_info->service_type = AV_AUDIO_SERVICE_TYPE_KARAOKE;
169
169
    if(hdr.bitstream_id>10)
170
 
        hdr_info->codec_id = CODEC_ID_EAC3;
171
 
    else if (hdr_info->codec_id == CODEC_ID_NONE)
172
 
        hdr_info->codec_id = CODEC_ID_AC3;
 
170
        hdr_info->codec_id = AV_CODEC_ID_EAC3;
 
171
    else if (hdr_info->codec_id == AV_CODEC_ID_NONE)
 
172
        hdr_info->codec_id = AV_CODEC_ID_AC3;
173
173
 
174
174
    *need_next_header = (hdr.frame_type != EAC3_FRAME_TYPE_AC3_CONVERT);
175
175
    *new_frame_start  = (hdr.frame_type != EAC3_FRAME_TYPE_DEPENDENT);
186
186
 
187
187
 
188
188
AVCodecParser ff_ac3_parser = {
189
 
    .codec_ids      = { CODEC_ID_AC3, CODEC_ID_EAC3 },
 
189
    .codec_ids      = { AV_CODEC_ID_AC3, AV_CODEC_ID_EAC3 },
190
190
    .priv_data_size = sizeof(AACAC3ParseContext),
191
191
    .parser_init    = ac3_parse_init,
192
192
    .parser_parse   = ff_aac_ac3_parse,