[FFmpeg-devel] [PATCH]pes packetizer

Michael Niedermayer michaelni
Sun Jul 29 02:12:08 CEST 2007


Hi

On Sun, Jul 15, 2007 at 09:34:56AM +0800, realsun wrote:
[...]
> +    put_byte(&ctx->pb, 0x80); /* mpeg2 id */
>  
> -        if (!s->is_mpeg2)
> -            for(i=0;i<stuffing_size;i++)
> -                put_byte(&ctx->pb, 0xff);
> -
> -        if (s->is_mpeg2) {
> -            put_byte(&ctx->pb, 0x80); /* mpeg2 id */

cosmetic


[...]
> -                put_timestamp(&ctx->pb, (pes_flags & 0x40) ? 0x03 : 0x02, pts);
> +                ff_insert_timestamp(&ctx->pb, (pes_flags & 0x40) ? 0x03 : 0x02, pts);

the renaming could be a seperate patch


[...]
> @@ -866,128 +134,30 @@
>                      put_be16(&ctx->pb, 0x4000 | stream->max_buffer_size/128);
>                  else
>                      put_be16(&ctx->pb, 0x6000 | stream->max_buffer_size/1024);
> -            }
> +    }

cosmetic


[...]
>              /* special stuffing byte that is always written
> -               to prevent accidental generation of start codes. */
> +               to prevent accidental generation of startcodes. */
>              put_byte(&ctx->pb, 0xff);

cosmetic


[...]
> -static void put_vcd_padding_sector(AVFormatContext *ctx)
> +int ff_pes_remove_decoded_packets(AVFormatContext *ctx, int64_t scr)
>  {
[...]
> -static int remove_decoded_packets(AVFormatContext *ctx, int64_t scr){

> -//    MpegMuxContext *s = ctx->priv_data;

cosmetic

[...]
> -        if(remove_decoded_packets(ctx, scr) < 0)
> +        if(ff_pes_remove_decoded_packets(ctx, scr) < 0)

this remaning too could be in a seperate patch


also the patch could be split further, that is introduction of new structs/
functional changes and the actual split into several files could be in
seperate patches

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If you really think that XML is the answer, then you definitly missunderstood
the question -- Attila Kinali
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070729/ec3f631e/attachment.pgp>



More information about the ffmpeg-devel mailing list