static void get_private_data(OutputStream *os)

{

    AVCodecContext *codec = os->ctx->streams[0]->codec;

    uint8_t *ptr = codec->extradata;

    int size = codec->extradata_size;

    int i;

    if (codec->codec_id == AV_CODEC_ID_H264) {

        ff_avc_write_annexb_extradata(ptr, &ptr, &size);

        if (!ptr)

            ptr = codec->extradata;

    }

    if (!ptr)

        return;

    os->private_str = av_mallocz(2*size + 1);

    if (!os->private_str)

        return;

    for (i = 0; i < size; i++)

        snprintf(&os->private_str[2*i], 3, "%02x", ptr[i]);

    if (ptr != codec->extradata)

        av_free(ptr);

}

static void get_private_data(OutputStream *os)

{

    AVCodecContext *codec = os->ctx->streams[0]->codec;

    uint8_t *ptr = codec->extradata;

    int size = codec->extradata_size;

    int i;

    if (codec->codec_id == AV_CODEC_ID_H264) {

        ff_avc_write_annexb_extradata(ptr, &ptr, &size);

        if (!ptr)

            ptr = codec->extradata;

    }

    if (!ptr)

        return;

    os->private_str = av_mallocz(2*size + 1);

    if (!os->private_str)

        return;

    for (i = 0; i < size; i++)

        snprintf(&os->private_str[2*i], 3, "%02x", ptr[i]);

    if (ptr != codec->extradata)

        av_free(ptr);

}

static void FUNC_0(OutputStream *VAR_0)

{

    AVCodecContext *codec = VAR_0->ctx->streams[0]->codec;

    uint8_t *ptr = codec->extradata;

    int VAR_1 = codec->extradata_size;

    int VAR_2;

    if (codec->codec_id == AV_CODEC_ID_H264) {

        ff_avc_write_annexb_extradata(ptr, &ptr, &VAR_1);

        if (!ptr)

            ptr = codec->extradata;

    }

    if (!ptr)

        return;

    VAR_0->private_str = av_mallocz(2*VAR_1 + 1);

    if (!VAR_0->private_str)

        return;

    for (VAR_2 = 0; VAR_2 < VAR_1; VAR_2++)

        snprintf(&VAR_0->private_str[2*VAR_2], 3, "%02x", ptr[VAR_2]);

    if (ptr != codec->extradata)

        av_free(ptr);

}

static void FUNC_0(OutputStream *VAR_0)
{ AVCodecContext *codec = VAR_0->ctx->streams[0]->codec; uint8_t *ptr = codec->extradata; int VAR_1 = codec->extradata_size; int VAR_2; if (codec->codec_id == AV_CODEC_ID_H264) { ff_avc_write_annexb_extradata(ptr, &ptr, &VAR_1); if (!ptr)
ptr = codec->extradata; } if (!ptr)
return; VAR_0->private_str = av_mallocz(2*VAR_1 + 1); if (!VAR_0->private_str)
return; for (VAR_2 = 0; VAR_2 < VAR_1; VAR_2++) snprintf(&VAR_0->private_str[2*VAR_2], 3, "%02x", ptr[VAR_2]); if (ptr != codec->extradata)
av_free(ptr); }