diff options
author | Giovanne Castro <giovannefc@ig.com.br> | 2011-07-15 15:07:37 -0300 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2011-07-21 22:52:08 -0500 |
commit | 8630ff272e398b82881be9a4e952c8cd08e1a73f (patch) | |
tree | 683b19316fa46ab233aed6b3641fe915db55aaf0 /multimedia/cinelerra/ffmpeg.patch | |
parent | 632b1ce582329f1fac03eb3803ad4753365191a4 (diff) | |
download | slackbuilds-8630ff272e398b82881be9a4e952c8cd08e1a73f.tar.gz |
multimedia/cinelerra: Updated for version cv_2.1.5.
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
Diffstat (limited to 'multimedia/cinelerra/ffmpeg.patch')
-rw-r--r-- | multimedia/cinelerra/ffmpeg.patch | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/multimedia/cinelerra/ffmpeg.patch b/multimedia/cinelerra/ffmpeg.patch new file mode 100644 index 0000000000..fa67e732b5 --- /dev/null +++ b/multimedia/cinelerra/ffmpeg.patch @@ -0,0 +1,76 @@ +Fix build with ffmpeg/libav trunk / 0.7 + +Index: cinelerra/cinelerra/ffmpeg.C +=================================================================== +--- cinelerra.orig/cinelerra/ffmpeg.C ++++ cinelerra/cinelerra/ffmpeg.C +@@ -364,12 +364,15 @@ int FFMPEG::decode(uint8_t *data, long d + + // NOTE: frame must already have data space allocated + ++ AVPacket pkt; + got_picture = 0; +- int length = avcodec_decode_video(context, ++ av_init_packet( &pkt ); ++ pkt.data = data; ++ pkt.size = data_size; ++ int length = avcodec_decode_video2(context, + picture, + &got_picture, +- data, +- data_size); ++ &pkt); + + if (length < 0) { + printf("FFMPEG::decode error decoding frame\n"); +Index: cinelerra/quicktime/qtffmpeg.c +=================================================================== +--- cinelerra.orig/quicktime/qtffmpeg.c ++++ cinelerra/quicktime/qtffmpeg.c +@@ -181,6 +181,7 @@ static int decode_wrapper(quicktime_t *f + + if(!result) + { ++ AVPacket pkt; + + + // No way to determine if there was an error based on nonzero status. +@@ -189,11 +190,13 @@ static int decode_wrapper(quicktime_t *f + ffmpeg->decoder_context[current_field]->skip_frame = AVDISCARD_NONREF /* AVDISCARD_BIDIR */; + else + ffmpeg->decoder_context[current_field]->skip_frame = AVDISCARD_DEFAULT; +- result = avcodec_decode_video(ffmpeg->decoder_context[current_field], ++ av_init_packet( &pkt ); ++ pkt.data = ffmpeg->work_buffer; ++ pkt.size = bytes + header_bytes; ++ result = avcodec_decode_video2(ffmpeg->decoder_context[current_field], + &ffmpeg->picture[current_field], + &got_picture, +- ffmpeg->work_buffer, +- bytes + header_bytes); ++ &pkt); + + + +Index: cinelerra/quicktime/wma.c +=================================================================== +--- cinelerra.orig/quicktime/wma.c ++++ cinelerra/quicktime/wma.c +@@ -195,11 +195,14 @@ printf("decode 2 %x %llx %llx\n", chunk_ + chunk_size); + #else + bytes_decoded = AVCODEC_MAX_AUDIO_FRAME_SIZE; +- result = avcodec_decode_audio2(codec->decoder_context, ++ AVPacket pkt; ++ av_init_packet( &pkt ); ++ pkt.data = codec->packet_buffer; ++ pkt.size = chunk_size; ++ result = avcodec_decode_audio3(codec->decoder_context, + (int16_t*)(codec->work_buffer + codec->output_size * sample_size), + &bytes_decoded, +- codec->packet_buffer, +- chunk_size); ++ &pkt); + #endif + + pthread_mutex_unlock(&ffmpeg_lock); |