Revision cf92cec7 libavcodec/mpegaudio_parser.c

View differences:

libavcodec/mpegaudio_parser.c
46 46
   header, otherwise the coded frame size in bytes */
47 47
int ff_mpa_decode_header(AVCodecContext *avctx, uint32_t head, int *sample_rate, int *channels, int *frame_size, int *bit_rate)
48 48
{
49
    MPADecodeContext s1, *s = &s1;
50
    s1.avctx = avctx;
49
    MPADecodeHeader s1, *s = &s1;
51 50

  
52 51
    if (ff_mpa_check_header(head) != 0)
53 52
        return -1;
......
145 144

  
146 145
#if 0
147 146
                    /* free format: prepare to compute frame size */
148
                    if (ff_mpegaudio_decode_header(s, header) == 1) {
147
                    if (ff_mpegaudio_decode_header((MPADecodeHeader *)s, header) == 1) {
149 148
                        s->frame_size = -1;
150 149
                    }
151 150
#endif
......
200 199
                            s->free_format_frame_size -= padding;
201 200
                        dprintf(avctx, "free frame size=%d padding=%d\n",
202 201
                                s->free_format_frame_size, padding);
203
                        ff_mpegaudio_decode_header(s, header1);
202
                        ff_mpegaudio_decode_header((MPADecodeHeader *)s, header1);
204 203
                        goto next_data;
205 204
                    }
206 205
                    p++;

Also available in: Unified diff