1 Fix build with ffmpeg/libav trunk / 0.7
3 Index: cinelerra-20101104/cinelerra/ffmpeg.C
4 ===================================================================
5 --- cinelerra-20101104.orig/cinelerra/ffmpeg.C
6 +++ cinelerra-20101104/cinelerra/ffmpeg.C
7 @@ -364,12 +364,15 @@ int FFMPEG::decode(uint8_t *data, long d
9 // NOTE: frame must already have data space allocated
13 - int length = avcodec_decode_video(context,
14 + av_init_packet( &pkt );
16 + pkt.size = data_size;
17 + int length = avcodec_decode_video2(context,
25 printf("FFMPEG::decode error decoding frame\n");
26 Index: cinelerra-20101104/quicktime/qtffmpeg.c
27 ===================================================================
28 --- cinelerra-20101104.orig/quicktime/qtffmpeg.c
29 +++ cinelerra-20101104/quicktime/qtffmpeg.c
30 @@ -181,6 +181,7 @@ static int decode_wrapper(quicktime_t *f
37 // No way to determine if there was an error based on nonzero status.
38 @@ -189,11 +190,13 @@ static int decode_wrapper(quicktime_t *f
39 ffmpeg->decoder_context[current_field]->skip_frame = AVDISCARD_NONREF /* AVDISCARD_BIDIR */;
41 ffmpeg->decoder_context[current_field]->skip_frame = AVDISCARD_DEFAULT;
42 - result = avcodec_decode_video(ffmpeg->decoder_context[current_field],
43 + av_init_packet( &pkt );
44 + pkt.data = ffmpeg->work_buffer;
45 + pkt.size = bytes + header_bytes;
46 + result = avcodec_decode_video2(ffmpeg->decoder_context[current_field],
47 &ffmpeg->picture[current_field],
49 - ffmpeg->work_buffer,
50 - bytes + header_bytes);
55 Index: cinelerra-20101104/quicktime/wma.c
56 ===================================================================
57 --- cinelerra-20101104.orig/quicktime/wma.c
58 +++ cinelerra-20101104/quicktime/wma.c
59 @@ -195,11 +195,14 @@ printf("decode 2 %x %llx %llx\n", chunk_
62 bytes_decoded = AVCODEC_MAX_AUDIO_FRAME_SIZE;
63 - result = avcodec_decode_audio2(codec->decoder_context,
65 + av_init_packet( &pkt );
66 + pkt.data = codec->packet_buffer;
67 + pkt.size = chunk_size;
68 + result = avcodec_decode_audio3(codec->decoder_context,
69 (int16_t*)(codec->work_buffer + codec->output_size * sample_size),
71 - codec->packet_buffer,
76 pthread_mutex_unlock(&ffmpeg_lock);