diff -ruN grass-6.4.2.orig/lib/ogsf/gsd_img_mpeg.c grass-6.4.2/lib/ogsf/gsd_img_mpeg.c --- grass-6.4.2.orig/lib/ogsf/gsd_img_mpeg.c 2009-01-12 08:46:29.000000000 +0100 +++ grass-6.4.2/lib/ogsf/gsd_img_mpeg.c 2012-07-23 11:14:01.332476336 +0200 @@ -26,7 +26,7 @@ /* FFMPEG stuff */ #ifdef HAVE_FFMPEG -#include <avformat.h> +#include <libavformat/avformat.h> /* 5 seconds stream duration */ #define STREAM_DURATION 5.0 @@ -66,7 +66,7 @@ c = st->codec; c->codec_id = codec_id; - c->codec_type = CODEC_TYPE_VIDEO; + c->codec_type = AVMEDIA_TYPE_VIDEO; /* put sample parameters */ c->bit_rate = 400000; @@ -215,7 +215,7 @@ av_init_packet(&pkt); - pkt.flags |= PKT_FLAG_KEY; + pkt.flags |= AV_PKT_FLAG_KEY; pkt.stream_index = st->index; pkt.data = (uint8_t *) picture; pkt.size = sizeof(AVPicture); @@ -236,7 +236,7 @@ av_rescale_q(c->coded_frame->pts, c->time_base, st->time_base); if (c->coded_frame->key_frame) - pkt.flags |= PKT_FLAG_KEY; + pkt.flags |= AV_PKT_FLAG_KEY; pkt.stream_index = st->index; pkt.data = video_outbuf; pkt.size = out_size; @@ -301,10 +301,10 @@ av_register_all(); /* auto detect the output format from the name. default is mpeg. */ - fmt = guess_format(NULL, filename, NULL); + fmt = av_guess_format(NULL, filename, NULL); if (!fmt) { G_warning(_("Unable to deduce output format from file extension: using MPEG")); - fmt = guess_format("mpeg", NULL, NULL); + fmt = av_guess_format("mpeg", NULL, NULL); } if (!fmt) { G_warning(_("Unable to find suitable output format")); @@ -312,7 +312,7 @@ } /* allocate the output media context */ - oc = av_alloc_format_context(); + oc = avformat_alloc_context(); if (!oc) { G_warning(_("Out of memory")); return (-1);