Mercurial > libavformat.hg
comparison mpeg.c @ 467:40069a91d1a0 libavformat
dont add padding in the middle of the data patch by (Sidik Isani <isani at cfht dot hawaii dot edu>)
author | michael |
---|---|
date | Tue, 25 May 2004 23:06:00 +0000 |
parents | 696f41bc8784 |
children | 60f897e8dd2d |
comparison
equal
deleted
inserted
replaced
466:0dd5b381fc9a | 467:40069a91d1a0 |
---|---|
728 } else { | 728 } else { |
729 put_byte(&ctx->pb, 0x0f); | 729 put_byte(&ctx->pb, 0x0f); |
730 } | 730 } |
731 } | 731 } |
732 | 732 |
733 if (s->is_mpeg2) { | |
734 /* special stuffing byte that is always written | |
735 to prevent accidental generation of start codes. */ | |
736 put_byte(&ctx->pb, 0xff); | |
737 | |
738 for(i=0;i<stuffing_size;i++) | |
739 put_byte(&ctx->pb, 0xff); | |
740 } | |
741 | |
733 if (startcode == PRIVATE_STREAM_1) { | 742 if (startcode == PRIVATE_STREAM_1) { |
734 put_byte(&ctx->pb, id); | 743 put_byte(&ctx->pb, id); |
735 if (id >= 0xa0) { | 744 if (id >= 0xa0) { |
736 /* LPCM (XXX: check nb_frames) */ | 745 /* LPCM (XXX: check nb_frames) */ |
737 put_byte(&ctx->pb, 7); | 746 put_byte(&ctx->pb, 7); |
742 } else { | 751 } else { |
743 /* AC3 */ | 752 /* AC3 */ |
744 put_byte(&ctx->pb, stream->nb_frames); | 753 put_byte(&ctx->pb, stream->nb_frames); |
745 put_be16(&ctx->pb, stream->frame_start_offset); | 754 put_be16(&ctx->pb, stream->frame_start_offset); |
746 } | 755 } |
747 } | |
748 | |
749 if (s->is_mpeg2) { | |
750 /* special stuffing byte that is always written | |
751 to prevent accidental generation of start codes. */ | |
752 put_byte(&ctx->pb, 0xff); | |
753 | |
754 for(i=0;i<stuffing_size;i++) | |
755 put_byte(&ctx->pb, 0xff); | |
756 } | 756 } |
757 | 757 |
758 /* output data */ | 758 /* output data */ |
759 put_buffer(&ctx->pb, stream->buffer, payload_size - stuffing_size); | 759 put_buffer(&ctx->pb, stream->buffer, payload_size - stuffing_size); |
760 } | 760 } |