Revision be1e2a2b libavcodec/ac3_parser.c

View differences:

libavcodec/ac3_parser.c
123 123
    return 0;
124 124
}
125 125

  
126
static int ac3_sync(AACAC3ParseContext *hdr_info)
126
static int ac3_sync(AACAC3ParseContext *hdr_info, AACAC3FrameFlag *flag)
127 127
{
128 128
    int err;
129 129
    AC3HeaderInfo hdr;
......
137 137
    hdr_info->bit_rate = hdr.bit_rate;
138 138
    hdr_info->channels = hdr.channels;
139 139
    hdr_info->samples = AC3_FRAME_SIZE;
140

  
141
    switch(hdr.stream_type){
142
        case EAC3_STREAM_TYPE_INDEPENDENT:
143
            *flag = FRAME_START;
144
            break;
145
        case EAC3_STREAM_TYPE_DEPENDENT:
146
            *flag = FRAME_CONTINUATION;
147
            break;
148
        case EAC3_STREAM_TYPE_AC3_CONVERT:
149
            *flag = FRAME_COMPLETE;
150
            break;
151
    }
140 152
    return hdr.frame_size;
141 153
}
142 154

  

Also available in: Unified diff