void ff_rtp_send_hevc(AVFormatContext *ctx, const uint8_t *frame_buf, int frame_size)

{

    const uint8_t *next_NAL_unit;

    const uint8_t *buf_ptr, *buf_end = frame_buf + frame_size;

    RTPMuxContext *rtp_ctx = ctx->priv_data;



    /* use the default 90 KHz time stamp */

    rtp_ctx->timestamp = rtp_ctx->cur_timestamp;

    rtp_ctx->buf_ptr   = rtp_ctx->buf;



    if (rtp_ctx->nal_length_size)

        buf_ptr = ff_avc_mp4_find_startcode(frame_buf, buf_end, rtp_ctx->nal_length_size) ? frame_buf : buf_end;

    else

        buf_ptr = ff_avc_find_startcode(frame_buf, buf_end);



    /* find all NAL units and send them as separate packets */

    while (buf_ptr < buf_end) {

        if (rtp_ctx->nal_length_size) {

            next_NAL_unit = ff_avc_mp4_find_startcode(buf_ptr, buf_end, rtp_ctx->nal_length_size);

            if (!next_NAL_unit)

                next_NAL_unit = buf_end;



            buf_ptr += rtp_ctx->nal_length_size;

        } else {

            while (!*(buf_ptr++))

                ;

            next_NAL_unit = ff_avc_find_startcode(buf_ptr, buf_end);

        }

        /* send the next NAL unit */

        nal_send(ctx, buf_ptr, next_NAL_unit - buf_ptr, next_NAL_unit == buf_end);



        /* jump to the next NAL unit */

        buf_ptr = next_NAL_unit;

    }

    flush_buffered(ctx, 1);

}

void ff_rtp_send_hevc(AVFormatContext *ctx, const uint8_t *frame_buf, int frame_size)

{

    const uint8_t *next_NAL_unit;

    const uint8_t *buf_ptr, *buf_end = frame_buf + frame_size;

    RTPMuxContext *rtp_ctx = ctx->priv_data;



    

    rtp_ctx->timestamp = rtp_ctx->cur_timestamp;

    rtp_ctx->buf_ptr   = rtp_ctx->buf;



    if (rtp_ctx->nal_length_size)

        buf_ptr = ff_avc_mp4_find_startcode(frame_buf, buf_end, rtp_ctx->nal_length_size) ? frame_buf : buf_end;

    else

        buf_ptr = ff_avc_find_startcode(frame_buf, buf_end);



    

    while (buf_ptr < buf_end) {

        if (rtp_ctx->nal_length_size) {

            next_NAL_unit = ff_avc_mp4_find_startcode(buf_ptr, buf_end, rtp_ctx->nal_length_size);

            if (!next_NAL_unit)

                next_NAL_unit = buf_end;



            buf_ptr += rtp_ctx->nal_length_size;

        } else {

            while (!*(buf_ptr++))

                ;

            next_NAL_unit = ff_avc_find_startcode(buf_ptr, buf_end);

        }

        

        nal_send(ctx, buf_ptr, next_NAL_unit - buf_ptr, next_NAL_unit == buf_end);



        

        buf_ptr = next_NAL_unit;

    }

    flush_buffered(ctx, 1);

}

        } else {         } else {     RTPMuxContext *rtp_ctx = ctx->priv_data;         } else { void ff_rtp_send_hevc(AVFormatContext *ctx, const uint8_t *frame_buf, int frame_size)     const uint8_t *next_NAL_unit;     const uint8_t *buf_ptr, *buf_end = frame_buf + frame_size;     RTPMuxContext *rtp_ctx = ctx->priv_data;     rtp_ctx->timestamp = rtp_ctx->cur_timestamp;     rtp_ctx->buf_ptr   = rtp_ctx->buf;     if (rtp_ctx->nal_length_size)         buf_ptr = ff_avc_mp4_find_startcode(frame_buf, buf_end, rtp_ctx->nal_length_size) ? frame_buf : buf_end;         buf_ptr = ff_avc_find_startcode(frame_buf, buf_end);     while (buf_ptr < buf_end) {         if (rtp_ctx->nal_length_size) {             next_NAL_unit = ff_avc_mp4_find_startcode(buf_ptr, buf_end, rtp_ctx->nal_length_size);             if (!next_NAL_unit)                 next_NAL_unit = buf_end;             buf_ptr += rtp_ctx->nal_length_size;         } else {             while (!*(buf_ptr++))             next_NAL_unit = ff_avc_find_startcode(buf_ptr, buf_end);         nal_send(ctx, buf_ptr, next_NAL_unit - buf_ptr, next_NAL_unit == buf_end);         buf_ptr = next_NAL_unit;     flush_buffered(ctx, 1);
void FUNC_0(AVFormatContext *VAR_0, const uint8_t *VAR_1, int VAR_2)

{

    const uint8_t *VAR_3;

    const uint8_t *VAR_4, *buf_end = VAR_1 + VAR_2;

    RTPMuxContext *rtp_ctx = VAR_0->priv_data;



    

    rtp_ctx->timestamp = rtp_ctx->cur_timestamp;

    rtp_ctx->VAR_4   = rtp_ctx->buf;



    if (rtp_ctx->nal_length_size)

        VAR_4 = ff_avc_mp4_find_startcode(VAR_1, buf_end, rtp_ctx->nal_length_size) ? VAR_1 : buf_end;

    else

        VAR_4 = ff_avc_find_startcode(VAR_1, buf_end);



    

    while (VAR_4 < buf_end) {

        if (rtp_ctx->nal_length_size) {

            VAR_3 = ff_avc_mp4_find_startcode(VAR_4, buf_end, rtp_ctx->nal_length_size);

            if (!VAR_3)

                VAR_3 = buf_end;



            VAR_4 += rtp_ctx->nal_length_size;

        } else {

            while (!*(VAR_4++))

                ;

            VAR_3 = ff_avc_find_startcode(VAR_4, buf_end);

        }

        

        nal_send(VAR_0, VAR_4, VAR_3 - VAR_4, VAR_3 == buf_end);



        

        VAR_4 = VAR_3;

    }

    flush_buffered(VAR_0, 1);

}

void FUNC_0(AVFormatContext *VAR_0, const uint8_t *VAR_1, int VAR_2)
{ const uint8_t *VAR_3; const uint8_t *VAR_4, *buf_end = VAR_1 + VAR_2; RTPMuxContext *rtp_ctx = VAR_0->priv_data; rtp_ctx->timestamp = rtp_ctx->cur_timestamp; rtp_ctx->VAR_4   = rtp_ctx->buf; if (rtp_ctx->nal_length_size)
VAR_4 = ff_avc_mp4_find_startcode(VAR_1, buf_end, rtp_ctx->nal_length_size) ? VAR_1 : buf_end; else
VAR_4 = ff_avc_find_startcode(VAR_1, buf_end); while (VAR_4 < buf_end) { if (rtp_ctx->nal_length_size) { VAR_3 = ff_avc_mp4_find_startcode(VAR_4, buf_end, rtp_ctx->nal_length_size); if (!VAR_3)
VAR_3 = buf_end; VAR_4 += rtp_ctx->nal_length_size; } else { while (!*(VAR_4++))
; VAR_3 = ff_avc_find_startcode(VAR_4, buf_end); } nal_send(VAR_0, VAR_4, VAR_3 - VAR_4, VAR_3 == buf_end); VAR_4 = VAR_3; } flush_buffered(VAR_0, 1); }