mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-16 18:53:17 +00:00
61 lines
2.0 KiB
Diff
61 lines
2.0 KiB
Diff
--- kino-1.3.4.orig/src/frame.cc 2011-07-17 14:54:59.089481638 +0200
|
|
+++ kino-1.3.4/src/frame.cc 2011-07-17 15:09:23.199481714 +0200
|
|
@@ -1063,7 +1063,12 @@
|
|
AVPicture dest;
|
|
int got_picture;
|
|
|
|
- avcodec_decode_video( libavcodec, frame, &got_picture, data, GetFrameSize() );
|
|
+ AVPacket pkt;
|
|
+ av_init_packet(&pkt);
|
|
+ pkt.data = data;
|
|
+ pkt.size = GetFrameSize();
|
|
+
|
|
+ avcodec_decode_video2( libavcodec, frame, &got_picture, &pkt );
|
|
if ( got_picture )
|
|
{
|
|
avpicture_fill( &dest, static_cast<uint8_t*>( rgb ), PIX_FMT_RGB24, GetWidth(), GetHeight() );
|
|
@@ -1123,7 +1128,12 @@
|
|
AVPicture output;
|
|
int got_picture;
|
|
|
|
- avcodec_decode_video( libavcodec, frame, &got_picture, data, GetFrameSize() );
|
|
+ AVPacket pkt;
|
|
+ av_init_packet(&pkt);
|
|
+ pkt.data = data;
|
|
+ pkt.size = GetFrameSize();
|
|
+
|
|
+ avcodec_decode_video2( libavcodec, frame, &got_picture, &pkt );
|
|
if ( got_picture )
|
|
{
|
|
avpicture_fill( &output, static_cast<uint8_t*>( yuv ), PIX_FMT_YUV422, GetWidth(), GetHeight() );
|
|
@@ -1156,7 +1166,12 @@
|
|
AVFrame *frame = avcodec_alloc_frame();
|
|
int got_picture;
|
|
|
|
- avcodec_decode_video( libavcodec, frame, &got_picture, data, GetFrameSize() );
|
|
+ AVPacket pkt;
|
|
+ av_init_packet(&pkt);
|
|
+ pkt.data = data;
|
|
+ pkt.size = GetFrameSize();
|
|
+
|
|
+ avcodec_decode_video2( libavcodec, frame, &got_picture, &pkt );
|
|
|
|
int width = GetWidth(), height = GetHeight();
|
|
|
|
@@ -1319,12 +1334,12 @@
|
|
#if defined(HAVE_LIBAVCODEC)
|
|
if ( avformatEncoder == NULL )
|
|
{
|
|
- avformatEncoder = av_alloc_format_context();
|
|
+ avformatEncoder = avformat_alloc_context();
|
|
if ( avformatEncoder )
|
|
{
|
|
- avformatEncoder->oformat = guess_format( "dv", NULL, NULL );
|
|
+ avformatEncoder->oformat = av_guess_format( "dv", NULL, NULL );
|
|
AVStream* vst = av_new_stream( avformatEncoder, 0 );
|
|
- vst->codec->codec_type = CODEC_TYPE_VIDEO;
|
|
+ vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
|
|
vst->codec->codec_id = CODEC_ID_DVVIDEO;
|
|
vst->codec->bit_rate = 25000000;
|
|
vst->start_time = 0;
|