ports/math/octave-forge-video/files/patch-ffmpeg_2
William Grzybowski 532934f091 math/octave-forge-video: fix buid with newer ffmpeg
- Chase API changes with ffmpeg 2.0

Reported by:	marino
Approved by:	portmgr (bapt, implicit)
2013-10-28 16:01:32 +00:00

34 lines
1.4 KiB
Text

--- src/AVHandler.cc.orig 2013-10-28 13:54:16.834945990 -0200
+++ src/AVHandler.cc 2013-10-28 13:59:18.276945264 -0200
@@ -123,17 +123,17 @@
/* av_set_parameters is mandatory */
// FIXME: deprecated, but there's no replacement yet
- if (av_set_parameters(av_output, NULL) < 0) {
- (*out) << "AVHandler: Error setting output format parameters" << std::endl;
- return -1;
- }
+ //if (av_set_parameters(av_output, NULL) < 0) {
+ // (*out) << "AVHandler: Error setting output format parameters" << std::endl;
+ // return -1;
+ //}
snprintf(av_output->filename, sizeof(av_output->filename), "%s", filename.c_str());
// FIXME: snprintf(av_output->title, sizeof(av_output->title), "%s", title.c_str());
// FIXME: snprintf(av_output->author, sizeof(av_output->author), "%s", author.c_str());
// FIXME: snprintf(av_output->comment, sizeof(av_output->comment), "%s", comment.c_str());
- if (avio_open(&av_output->pb, filename.c_str(), URL_WRONLY) < 0) {
+ if (avio_open(&av_output->pb, filename.c_str(), AVIO_FLAG_WRITE) < 0) {
(*out) << "AVHandler: Could not open \"" << filename << "\" for output" << std::endl;
return -1;
}
@@ -384,7 +384,7 @@
AVCodec *codec;
for (codec = av_codec_next(0); codec != NULL; codec = av_codec_next(codec)) {
if ((codec->type == AVMEDIA_TYPE_VIDEO) &&
- (codec->encode)) {
+ av_codec_is_encoder(codec)) {
(*out) << codec->name << " ";
}
}