[FFmpeg-devel] [PATCH]pes packetizer

realsun sunxiaohui
Mon Jul 2 05:22:58 CEST 2007


Michael Niedermayer wrote:
> Hi
>
> On Fri, Jun 29, 2007 at 09:36:27AM +0800, realsun wrote:
> [...]
>   
>> Index: pes.h
>>     
>   

[...]

>   
>>              id = stream->id;
>> -            if (id == 0xbd && stream->max_buffer_size > P_STD_max_mpeg_PS1) {
>> -                P_STD_max_mpeg_PS1 = stream->max_buffer_size;
>> -            } else if (id >= 0xc0 && id <= 0xc7 && stream->max_buffer_size > P_STD_max_mpeg_audio) {
>> -                P_STD_max_mpeg_audio = stream->max_buffer_size;
>> -            } else if (id == 0xe0 && stream->max_buffer_size > P_STD_max_video) {
>> -                P_STD_max_video = stream->max_buffer_size;
>> +            if (id == 0xbd && pes_stream->max_buffer_size > P_STD_max_mpeg_PS1) {
>> +                P_STD_max_mpeg_PS1 = pes_stream->max_buffer_size;
>> +            } else if (id >= 0xc0 && id <= 0xc7 && pes_stream->max_buffer_size > P_STD_max_mpeg_audio) {
>> +                P_STD_max_mpeg_audio = pes_stream->max_buffer_size;
>> +            } else if (id == 0xe0 && pes_stream->max_buffer_size > P_STD_max_video) {
>> +                P_STD_max_video = pes_stream->max_buffer_size;
>>              }
>>          }
>>     
>
> cosmetic
>   
these are two different structures
pes_stream = &stream->pes_stream;

>
> [...]
>   
>> +        if (startcode == PRIVATE_STREAM_1) {
>> +            bytestream_put_byte(&p, id);
>> +            if (id >= 0xa0) {
>> +                /* LPCM (XXX: check nb_frames) */
>> +                bytestream_put_byte(&p, 7);
>> +                bytestream_put_be16(&p, 4); /* skip 3 header bytes */
>>  
>> -        nb_frames= get_nb_frames(ctx, stream, payload_size - stuffing_size);
>> +                bytestream_put_byte(&p, stream->lpcm_header[0]);
>> +                bytestream_put_byte(&p, stream->lpcm_header[1]);
>> +                bytestream_put_byte(&p, stream->lpcm_header[2]);
>>     
> [...]
>   
>> -        if (startcode == PRIVATE_STREAM_1) {
>> -            put_byte(&ctx->pb, id);
>> -            if (id >= 0xa0) {
>> -                /* LPCM (XXX: check nb_frames) */
>> -                put_byte(&ctx->pb, 7);
>> -                put_be16(&ctx->pb, 4); /* skip 3 header bytes */
>> -                put_byte(&ctx->pb, stream->lpcm_header[0]);
>> -                put_byte(&ctx->pb, stream->lpcm_header[1]);
>> -                put_byte(&ctx->pb, stream->lpcm_header[2]);
>>     
>
> this could be in a seperate patch
>   

this should not in pes packetizer so I refracted it out and use an array
to pass them

>
> ------------------------------------------------------------------------
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
> http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel






More information about the ffmpeg-devel mailing list