static int mp3_write_audio_packet(AVFormatContext *s, AVPacket *pkt)

{

    MP3Context  *mp3 = s->priv_data;



    if (pkt->data && pkt->size >= 4) {

        MPADecodeHeader c;

        int av_unused base;



        avpriv_mpegaudio_decode_header(&c, AV_RB32(pkt->data));



        if (!mp3->initial_bitrate)

            mp3->initial_bitrate = c.bit_rate;

        if ((c.bit_rate == 0) || (mp3->initial_bitrate != c.bit_rate))

            mp3->has_variable_bitrate = 1;



#ifdef FILTER_VBR_HEADERS

        /* filter out XING and INFO headers. */

        base = 4 + xing_offtbl[c.lsf == 1][c.nb_channels == 1];



        if (base + 4 <= pkt->size) {

            uint32_t v = AV_RB32(pkt->data + base);



            if (MKBETAG('X','i','n','g') == v || MKBETAG('I','n','f','o') == v)

                return 0;

        }



        /* filter out VBRI headers. */

        base = 4 + 32;



        if (base + 4 <= pkt->size && MKBETAG('V','B','R','I') == AV_RB32(pkt->data + base))

            return 0;

#endif



        if (mp3->xing_offset)

            mp3_xing_add_frame(mp3, pkt);

    }



    return ff_raw_write_packet(s, pkt);

}

static int mp3_write_audio_packet(AVFormatContext *s, AVPacket *pkt)

{

    MP3Context  *mp3 = s->priv_data;



    if (pkt->data && pkt->size >= 4) {

        MPADecodeHeader c;

        int av_unused base;



        avpriv_mpegaudio_decode_header(&c, AV_RB32(pkt->data));



        if (!mp3->initial_bitrate)

            mp3->initial_bitrate = c.bit_rate;

        if ((c.bit_rate == 0) || (mp3->initial_bitrate != c.bit_rate))

            mp3->has_variable_bitrate = 1;



#ifdef FILTER_VBR_HEADERS

        

        base = 4 + xing_offtbl[c.lsf == 1][c.nb_channels == 1];



        if (base + 4 <= pkt->size) {

            uint32_t v = AV_RB32(pkt->data + base);



            if (MKBETAG('X','i','n','g') == v || MKBETAG('I','n','f','o') == v)

                return 0;

        }



        

        base = 4 + 32;



        if (base + 4 <= pkt->size && MKBETAG('V','B','R','I') == AV_RB32(pkt->data + base))

            return 0;

#endif



        if (mp3->xing_offset)

            mp3_xing_add_frame(mp3, pkt);

    }



    return ff_raw_write_packet(s, pkt);

}

        avpriv_mpegaudio_decode_header(&c, AV_RB32(pkt->data));
static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1)

{

    MP3Context  *mp3 = VAR_0->priv_data;



    if (VAR_1->data && VAR_1->size >= 4) {

        MPADecodeHeader c;

        int VAR_2 base;



        avpriv_mpegaudio_decode_header(&c, AV_RB32(VAR_1->data));



        if (!mp3->initial_bitrate)

            mp3->initial_bitrate = c.bit_rate;

        if ((c.bit_rate == 0) || (mp3->initial_bitrate != c.bit_rate))

            mp3->has_variable_bitrate = 1;



#ifdef FILTER_VBR_HEADERS

        

        base = 4 + xing_offtbl[c.lsf == 1][c.nb_channels == 1];



        if (base + 4 <= VAR_1->size) {

            uint32_t v = AV_RB32(VAR_1->data + base);



            if (MKBETAG('X','i','n','g') == v || MKBETAG('I','n','f','o') == v)

                return 0;

        }



        

        base = 4 + 32;



        if (base + 4 <= VAR_1->size && MKBETAG('V','B','R','I') == AV_RB32(VAR_1->data + base))

            return 0;

#endif



        if (mp3->xing_offset)

            mp3_xing_add_frame(mp3, VAR_1);

    }



    return ff_raw_write_packet(VAR_0, VAR_1);

}

static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1)
{ MP3Context  *mp3 = VAR_0->priv_data; if (VAR_1->data && VAR_1->size >= 4) { MPADecodeHeader c; int VAR_2 base; avpriv_mpegaudio_decode_header(&c, AV_RB32(VAR_1->data)); if (!mp3->initial_bitrate)
mp3->initial_bitrate = c.bit_rate; if ((c.bit_rate == 0) || (mp3->initial_bitrate != c.bit_rate))
mp3->has_variable_bitrate = 1; #ifdef FILTER_VBR_HEADERS
base = 4 + xing_offtbl[c.lsf == 1][c.nb_channels == 1]; if (base + 4 <= VAR_1->size) { uint32_t v = AV_RB32(VAR_1->data + base); if (MKBETAG('X','i','n','g') == v || MKBETAG('I','n','f','o') == v)
return 0; } base = 4 + 32; if (base + 4 <= VAR_1->size && MKBETAG('V','B','R','I') == AV_RB32(VAR_1->data + base))
return 0; #endif
if (mp3->xing_offset)
mp3_xing_add_frame(mp3, VAR_1); } return ff_raw_write_packet(VAR_0, VAR_1); }