[FFmpeg-soc] [soc]: r2006 - in dvbmuxer: mpegpes.h mpegpesenc.c mpegtsenc.c
bcoudurier
subversion at mplayerhq.hu
Tue Mar 11 10:50:03 CET 2008
Author: bcoudurier
Date: Tue Mar 11 10:50:02 2008
New Revision: 2006
Log:
remove useless variables and fields
Modified:
dvbmuxer/mpegpes.h
dvbmuxer/mpegpesenc.c
dvbmuxer/mpegtsenc.c
Modified: dvbmuxer/mpegpes.h
==============================================================================
--- dvbmuxer/mpegpes.h (original)
+++ dvbmuxer/mpegpes.h Tue Mar 11 10:50:02 2008
@@ -43,29 +43,13 @@ typedef struct PacketDesc {
} PacketDesc;
/**
- * muxer type for PES
- */
-typedef enum {
- PESMUXER_PS,
- PESMUXER_TS,
- PESMUXER_PES
-} PESMuxerType;
-
-/**
- * PES context
- */
-typedef struct {
- PESMuxerType muxer_type;
- int packet_number;
-} PESContext;
-
-/**
* PES stream structure
*/
typedef struct {
AVFifoBuffer fifo;
int max_buffer_size; /**< in bytes */
int buffer_index;
+ int packet_counter;
PacketDesc *predecode_packet;
PacketDesc *premux_packet;
PacketDesc **next_packet;
Modified: dvbmuxer/mpegpesenc.c
==============================================================================
--- dvbmuxer/mpegpesenc.c (original)
+++ dvbmuxer/mpegpesenc.c Tue Mar 11 10:50:02 2008
@@ -122,7 +122,6 @@ int ff_pes_muxer_write(AVFormatContext *
int header_len, int packet_size, int payload_size, int stuffing_size)
{
PESStream *stream = ctx->streams[stream_index]->priv_data;
- PESContext *context = ctx->priv_data;
int pes_flags, i;
int data_size = payload_size - stuffing_size;
uint8_t *q = pes_buffer;
@@ -144,7 +143,7 @@ int ff_pes_muxer_write(AVFormatContext *
P-STD_buffer_size field be included in the first packet of
every stream. (see SVCD standard p. 26 V.2.3.1 and V.2.3.2
and MPEG-2 standard 2.7.7) */
- if (context->packet_number == 0 && context->muxer_type == PESMUXER_PS)
+ if (stream->packet_counter == 0 && strcmp(ctx->oformat->name, "mpegts"))
pes_flags |= 0x01;
bytestream_put_byte(&q, pes_flags); /* flags */
Modified: dvbmuxer/mpegtsenc.c
==============================================================================
--- dvbmuxer/mpegtsenc.c (original)
+++ dvbmuxer/mpegtsenc.c Tue Mar 11 10:50:02 2008
@@ -179,7 +179,6 @@ typedef struct MpegTSService {
} MpegTSService;
typedef struct MpegTSWrite {
- PESContext pes_context;
MpegTSSection pat; /* MPEG2 pat table */
MpegTSSection sdt; /* MPEG2 sdt table context */
MpegTSService **services;
@@ -459,7 +458,6 @@ static int mpegts_write_header(AVFormatC
for(i=0;i<s->nb_streams;i++) {
int codec_rate;
st = s->streams[i];
- ts_st = (MpegTSWriteStream*) st->priv_data;
if(st->codec->rc_max_rate)
codec_rate= st->codec->rc_max_rate;
else
@@ -637,7 +635,6 @@ static int flush_packet(AVFormatContext
{
MpegTSWrite *s = ctx->priv_data;
MpegTSWriteStream *stream = ctx->streams[stream_index]->priv_data;
- PESContext* pes_context = &s->pes_context;
PESStream *pes_stream = &stream->pes_stream;
int payload_size, id, stuffing_size, i, header_len;
int packet_size, es_size;
@@ -691,8 +688,6 @@ static int flush_packet(AVFormatContext
payload_size -= stuffing_size;
stuffing_size = 0;
}
- pes_context->packet_number = s->packet_number;
- pes_context->muxer_type = PESMUXER_TS;
pes_size = ff_pes_muxer_write(ctx, stream_index, stream->payload, pts, dts, id, stream->startcode, NULL, 0,
header_len, packet_size, payload_size, stuffing_size);
if(pes_size < 0)
More information about the FFmpeg-soc
mailing list