[med-svn] r7918 - trunk/packages/vxl/trunk/debian/patches
Mathieu Malaterre
malat-guest at alioth.debian.org
Sat Sep 24 16:07:28 UTC 2011
Author: malat-guest
Date: 2011-09-24 16:07:28 +0000 (Sat, 24 Sep 2011)
New Revision: 7918
Added:
trunk/packages/vxl/trunk/debian/patches/fixffmpegcomp.patch
Modified:
trunk/packages/vxl/trunk/debian/patches/series
Log:
add fix for libav transition
Added: trunk/packages/vxl/trunk/debian/patches/fixffmpegcomp.patch
===================================================================
--- trunk/packages/vxl/trunk/debian/patches/fixffmpegcomp.patch (rev 0)
+++ trunk/packages/vxl/trunk/debian/patches/fixffmpegcomp.patch 2011-09-24 16:07:28 UTC (rev 7918)
@@ -0,0 +1,100 @@
+Index: vxl-1.14.0/core/vidl/vidl_ffmpeg_ostream_v3.txx
+===================================================================
+--- vxl-1.14.0.orig/core/vidl/vidl_ffmpeg_ostream_v3.txx 2011-09-24 16:02:53.000000000 +0000
++++ vxl-1.14.0/core/vidl/vidl_ffmpeg_ostream_v3.txx 2011-09-24 16:04:56.000000000 +0000
+@@ -100,7 +100,7 @@
+
+ AVOutputFormat* file_oformat = 0;
+ if ( params_.file_format_ == vidl_ffmpeg_ostream_params::GUESS ) {
+- file_oformat = guess_format(NULL, filename_.c_str(), NULL);
++ file_oformat = av_guess_format(NULL, filename_.c_str(), NULL);
+ if (!file_oformat) {
+ vcl_cerr << "ffmpeg: Unable for find a suitable output format for "
+ << filename_ << '\n';
+@@ -132,7 +132,7 @@
+ vcl_strcmp(file_oformat->name, "3gp") != 0 )
+ video_enc->flags |= CODEC_FLAG_GLOBAL_HEADER;
+
+- video_enc->codec_type = CODEC_TYPE_VIDEO;
++ video_enc->codec_type = AVMEDIA_TYPE_VIDEO;
+
+ switch ( params_.encoder_ )
+ {
+@@ -318,8 +318,8 @@
+ video_enc->qmax = params_.video_qmax_;
+ video_enc->lmin = params_.video_lmin_;
+ video_enc->lmax = params_.video_lmax_;
+- video_enc->mb_qmin = params_.video_mb_qmin_;
+- video_enc->mb_qmax = params_.video_mb_qmax_;
++ //video_enc->mb_qmin = params_.video_mb_qmin_;
++ //video_enc->mb_qmax = params_.video_mb_qmax_;
+ video_enc->max_qdiff = params_.video_qdiff_;
+ video_enc->qblur = params_.video_qblur_;
+ video_enc->qcompress = params_.video_qcomp_;
+@@ -377,10 +377,10 @@
+ }
+
+ os_->fmt_cxt_->timestamp = 0;
+- os_->fmt_cxt_->title[0] = '\0';
+- os_->fmt_cxt_->author[0] = '\0';
+- os_->fmt_cxt_->copyright[0] = '\0';
+- os_->fmt_cxt_->comment[0] = '\0';
++ //os_->fmt_cxt_->title[0] = '\0';
++ //os_->fmt_cxt_->author[0] = '\0';
++ //os_->fmt_cxt_->copyright[0] = '\0';
++ //os_->fmt_cxt_->comment[0] = '\0';
+
+ vcl_strncpy( os_->fmt_cxt_->filename, filename_.c_str(), 1023 );
+
+@@ -542,7 +542,7 @@
+ pkt.pts = codec->coded_frame->pts;
+ }
+ if ( codec->coded_frame && codec->coded_frame->key_frame ) {
+- pkt.flags |= PKT_FLAG_KEY;
++ pkt.flags |= AV_PKT_FLAG_KEY;
+ }
+ av_interleaved_write_frame( os_->fmt_cxt_, &pkt );
+ }
+Index: vxl-1.14.0/core/vidl/vidl_ffmpeg_istream_v2.txx
+===================================================================
+--- vxl-1.14.0.orig/core/vidl/vidl_ffmpeg_istream_v2.txx 2011-09-24 16:02:53.000000000 +0000
++++ vxl-1.14.0/core/vidl/vidl_ffmpeg_istream_v2.txx 2011-09-24 16:03:08.000000000 +0000
+@@ -376,6 +376,9 @@
+ AVPacket pkt;
+ int got_picture = 0;
+
++ AVPacket avpkt;
++ av_init_packet(&avpkt);
++
+ while ( got_picture == 0 ) {
+ if ( av_read_frame( is_->fmt_cxt_, &pkt ) < 0 ) {
+ break;
+@@ -385,9 +388,12 @@
+ // Make sure that the packet is from the actual video stream.
+ if (pkt.stream_index==is_->vid_index_)
+ {
+- if ( avcodec_decode_video( codec,
++ avpkt.data = pkt.data;
++ avpkt.size = pkt.size;
++ avpkt.flags = AV_PKT_FLAG_KEY;
++ if ( avcodec_decode_video2( codec,
+ is_->frame_, &got_picture,
+- pkt.data, pkt.size ) < 0 ) {
++ &avpkt ) < 0 ) {
+ vcl_cerr << "vidl_ffmpeg_istream: Error decoding packet!\n";
+ return false;
+ }
+@@ -399,9 +405,11 @@
+ // I and P frame with a latency of one frame. You must do the
+ // following to have a chance to get the last frame of the video.
+ if ( !got_picture ) {
+- if ( avcodec_decode_video( codec,
++ avpkt.data = NULL;
++ avpkt.size = 0;
++ if ( avcodec_decode_video2( codec,
+ is_->frame_, &got_picture,
+- NULL, 0 ) >= 0 ) {
++ &avpkt ) >= 0 ) {
+ is_->last_dts += int64_t(is_->vid_str_->time_base.den) * is_->vid_str_->r_frame_rate.den
+ / is_->vid_str_->time_base.num / is_->vid_str_->r_frame_rate.num;
+ }
Modified: trunk/packages/vxl/trunk/debian/patches/series
===================================================================
--- trunk/packages/vxl/trunk/debian/patches/series 2011-09-24 16:07:13 UTC (rev 7917)
+++ trunk/packages/vxl/trunk/debian/patches/series 2011-09-24 16:07:28 UTC (rev 7918)
@@ -8,3 +8,4 @@
sse2.patch
renamelibs.patch
fixcomp.patch
+fixffmpegcomp.patch
More information about the debian-med-commit
mailing list