[Mlt-devel] mlt/src/modules/avformat consumer_avformat.c,1.26,1.27 producer_avformat.c,1.52,1.53
Brought to you by:
ddennedy,
lilo_booter
From: Charles Y. <lil...@us...> - 2005-07-19 21:04:24
|
Update of /cvsroot/mlt/mlt/src/modules/avformat In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21367 Modified Files: consumer_avformat.c producer_avformat.c Log Message: consumer_avformat.c producer_avformat.c + Sync with current ffmpeg CVS - PLEASE UPDATE FFMPEG FIRST Index: producer_avformat.c =================================================================== RCS file: /cvsroot/mlt/mlt/src/modules/avformat/producer_avformat.c,v retrieving revision 1.52 retrieving revision 1.53 diff -u -d -r1.52 -r1.53 --- producer_avformat.c 4 May 2005 11:28:12 -0000 1.52 +++ producer_avformat.c 19 Jul 2005 21:03:55 -0000 1.53 @@ -89,7 +89,7 @@ for( i = 0; i < context->nb_streams; i++ ) { // Get the codec context - AVCodecContext *codec_context = &context->streams[ i ]->codec; + AVCodecContext *codec_context = context->streams[ i ]->codec; // Determine the type and obtain the first index of each type switch( codec_context->codec_type ) @@ -446,7 +446,7 @@ AVStream *stream = context->streams[ index ]; // Get codec context - AVCodecContext *codec_context = &stream->codec; + AVCodecContext *codec_context = stream->codec; // Packet AVPacket pkt; @@ -650,7 +650,7 @@ AVStream *stream = context->streams[ index ]; // Get codec context - AVCodecContext *codec_context = &stream->codec; + AVCodecContext *codec_context = stream->codec; // Get the codec AVCodec *codec = mlt_properties_get_data( properties, "video_codec", NULL ); @@ -763,7 +763,7 @@ AVStream *stream = context->streams[ index ]; // Get codec context - AVCodecContext *codec_context = &stream->codec; + AVCodecContext *codec_context = stream->codec; // Packet AVPacket pkt; @@ -952,7 +952,7 @@ AVStream *stream = context->streams[ index ]; // Get codec context - AVCodecContext *codec_context = &stream->codec; + AVCodecContext *codec_context = stream->codec; // Get the codec AVCodec *codec = mlt_properties_get_data( properties, "audio_codec", NULL ); Index: consumer_avformat.c =================================================================== RCS file: /cvsroot/mlt/mlt/src/modules/avformat/consumer_avformat.c,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- consumer_avformat.c 7 Jul 2005 17:15:11 -0000 1.26 +++ consumer_avformat.c 19 Jul 2005 21:03:55 -0000 1.27 @@ -322,7 +322,7 @@ // If created, then initialise from properties if ( st != NULL ) { - AVCodecContext *c = &st->codec; + AVCodecContext *c = st->codec; c->codec_id = codec_id; c->codec_type = CODEC_TYPE_AUDIO; @@ -356,7 +356,7 @@ int audio_input_frame_size = 0; // Get the context - AVCodecContext *c = &st->codec; + AVCodecContext *c = st->codec; // Find the encoder AVCodec *codec = avcodec_find_encoder( c->codec_id ); @@ -369,7 +369,7 @@ if ( c->frame_size <= 1 ) { audio_input_frame_size = audio_outbuf_size / c->channels; - switch(st->codec.codec_id) + switch(st->codec->codec_id) { case CODEC_ID_PCM_S16LE: case CODEC_ID_PCM_S16BE: @@ -402,7 +402,7 @@ static void close_audio( AVFormatContext *oc, AVStream *st ) { - avcodec_close( &st->codec ); + avcodec_close( st->codec ); } /** Add a video output stream @@ -418,7 +418,7 @@ if ( st != NULL ) { - AVCodecContext *c = &st->codec; + AVCodecContext *c = st->codec; c->codec_id = codec_id; c->codec_type = CODEC_TYPE_VIDEO; @@ -549,7 +549,7 @@ static int open_video(AVFormatContext *oc, AVStream *st) { // Get the codec - AVCodecContext *video_enc = &st->codec; + AVCodecContext *video_enc = st->codec; // find the video encoder AVCodec *codec = avcodec_find_encoder( video_enc->codec_id ); @@ -572,7 +572,7 @@ void close_video(AVFormatContext *oc, AVStream *st) { - avcodec_close(&st->codec); + avcodec_close(st->codec); } static inline long time_difference( struct timeval *time1 ) @@ -770,7 +770,7 @@ // Allocate picture if ( video_st ) - output = alloc_picture( video_st->codec.pix_fmt, width, height ); + output = alloc_picture( video_st->codec->pix_fmt, width, height ); // Last check - need at least one stream if ( audio_st == NULL && video_st == NULL ) @@ -847,7 +847,7 @@ AVPacket pkt; av_init_packet( &pkt ); - c = &audio_st->codec; + c = audio_st->codec; sample_fifo_fetch( fifo, buffer, channels * audio_input_frame_size ); @@ -879,7 +879,7 @@ frame = mlt_deque_pop_front( queue ); frame_properties = MLT_FRAME_PROPERTIES( frame ); - c = &video_st->codec; + c = video_st->codec; if ( mlt_properties_get_int( frame_properties, "rendered" ) ) { @@ -912,7 +912,7 @@ } } - img_convert( ( AVPicture * )output, video_st->codec.pix_fmt, ( AVPicture * )input, PIX_FMT_YUV422, width, height ); + img_convert( ( AVPicture * )output, video_st->codec->pix_fmt, ( AVPicture * )input, PIX_FMT_YUV422, width, height ); } if (oc->oformat->flags & AVFMT_RAWPICTURE) |