@@ -0,0 +1,57 @@
1+--- kino-1.3.4.orig/src/frame.cc 2012-05-14 19:55:42.153772418 -0700
2++++ kino-1.3.4/src/frame.cc 2012-05-14 20:28:34.448838653 -0700
3+@@ -101,8 +101,9 @@
4+ #if defined(HAVE_LIBAVCODEC)
5+ pthread_mutex_lock( &avcodec_mutex );
6+ av_register_all();
7+- libavcodec = avcodec_alloc_context();
8+- avcodec_open( libavcodec, avcodec_find_decoder( CODEC_ID_DVVIDEO ) );
9++ libavcodec = avcodec_alloc_context3(NULL);
10++ avcodec_open2( libavcodec,
11++ avcodec_find_decoder( CODEC_ID_DVVIDEO ), NULL );
12+ pthread_mutex_unlock( &avcodec_mutex );
13+ data = ( unsigned char* ) av_mallocz( 144000 );
14+ #if defined(HAVE_SWSCALE)
15+@@ -1338,7 +1339,7 @@
16+ if ( avformatEncoder )
17+ {
18+ avformatEncoder->oformat = av_guess_format( "dv", NULL, NULL );
19+- AVStream* vst = av_new_stream( avformatEncoder, 0 );
20++ AVStream* vst = avformat_new_stream( avformatEncoder, NULL );
21+ vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
22+ vst->codec->codec_id = CODEC_ID_DVVIDEO;
23+ vst->codec->bit_rate = 25000000;
24+@@ -1364,12 +1365,10 @@
25+ vst->sample_aspect_ratio = avcodecEncoder->sample_aspect_ratio;
26+ #endif
27+ avcodecEncoder->thread_count = 2;
28+- avcodec_thread_init( avcodecEncoder, avcodecEncoder->thread_count );
29+ avcodecEncoder->time_base= isPAL ? ( AVRational ){ 1, 25 } : ( AVRational ){ 1001, 30000 };
30+ avcodecEncoder->pix_fmt = isPAL ? PIX_FMT_YUV420P : PIX_FMT_YUV411P;
31+ avcodecEncoder->flags |= CODEC_FLAG_INTERLACED_DCT;
32+- av_set_parameters( avformatEncoder, NULL );
33+- avcodec_open( avcodecEncoder, avcodec_find_encoder( CODEC_ID_DVVIDEO ) );
34++ avcodec_open2( avcodecEncoder, avcodec_find_encoder( CODEC_ID_DVVIDEO ), NULL );
35+ av_new_packet( &avpacketEncoder, 144000 );
36+ tempImage = ( uint8_t* ) av_malloc(
37+ avpicture_get_size( avcodecEncoder->pix_fmt, avcodecEncoder->width, avcodecEncoder->height ) );
38+@@ -1475,16 +1474,16 @@
39+
40+ // Encode
41+ bytesInFrame = avcodec_encode_video( avcodecEncoder, avpacketEncoder.data, size, output );
42+- url_open_buf( &avformatEncoder->pb, data, bytesInFrame, URL_WRONLY );
43++ avformatEncoder->pb = avio_alloc_context(data, bytesInFrame, 0, NULL, NULL, NULL, NULL);
44+ avpacketEncoder.size = bytesInFrame;
45+ if ( !isEncoderHeaderWritten )
46+ {
47+- av_write_header( avformatEncoder );
48++ avformat_write_header( avformatEncoder, NULL );
49+ isEncoderHeaderWritten = true;
50+ }
51+ av_write_frame( avformatEncoder, &avpacketEncoder );
52+ #if LIBAVFORMAT_VERSION_INT >= ((52<<16)+(0<<8)+0)
53+- url_close_buf( avformatEncoder->pb );
54++ avio_close( avformatEncoder->pb );
55+ #else
56+ url_close_buf( &avformatEncoder->pb );
57+ #endif