[FFmpeg-soc] Extend TSMuxer to H264 muxing

Baptiste Coudurier baptiste.coudurier at smartjog.com
Mon Apr 14 08:44:03 CEST 2008


Hi,

In addition to Michael's comments,

On Mon, Apr 14, 2008 at 01:52:41AM +0800, zhentan feng wrote:
> [...]
>
> +    for(; buf_index + 3 < size; buf_index++){
> +        if(buf[buf_index] == 0 && buf[buf_index+1] == 0 && buf[buf_index+2] == 1){

AUD nal unit type is 9, are you actually checking this ? Use AV_RB*.

> [...]
>
> +                    if(h_st->nal_unit_type == NAL_SPS){
> +                        *q++ = 0x28;
> +                        *q++ = 4;
> +                        *q++ = h_st->sps->profile_idc;
> +                        *q++ = 0;
> +                        *q++ = h_st->sps->level_idc;
> +                        *q++ = 0xc0;
> +                        // write HRD descriptor
> +                        if(h_st->sps->timing_info_present_flag){
> +                            *q++ = 0x2a;
> +                            *q++ = 8;
> +                            *q++ = 0x81;
> +                            *q++ = 0;//90khz_flag

Please add doxygen comments after constant values.

> +                            uint32_t ntick;
> +                            ntick = h_st->sps->num_units_in_tick;
> +                            *q++ = ntick >> 24;
> +                            *q++ = ntick >> 16;
> +                            *q++ = ntick >> 8;
> +                            *q++ = ntick;

See bytestream_put *

[...]

--
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
SMARTJOG SAS                                     http://www.smartjog.com
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
Phone: +33 1 49966312



More information about the FFmpeg-soc mailing list