[GRASS-SVN] r52980 - grass/trunk/lib/ogsf
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Aug 29 06:39:21 PDT 2012
Author: neteler
Date: 2012-08-29 06:39:20 -0700 (Wed, 29 Aug 2012)
New Revision: 52980
Modified:
grass/trunk/lib/ogsf/gsd_img_mpeg.c
Log:
support for more recent FFMPEG lib versions (fixes #1423)
Modified: grass/trunk/lib/ogsf/gsd_img_mpeg.c
===================================================================
--- grass/trunk/lib/ogsf/gsd_img_mpeg.c 2012-08-29 13:38:58 UTC (rev 52979)
+++ grass/trunk/lib/ogsf/gsd_img_mpeg.c 2012-08-29 13:39:20 UTC (rev 52980)
@@ -65,7 +65,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;
@@ -214,7 +214,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);
@@ -235,7 +235,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;
@@ -300,10 +300,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"));
@@ -311,7 +311,7 @@
}
/* allocate the output media context */
- oc = av_alloc_format_context();
+ oc = avformat_alloc_context();
if (!oc) {
G_warning(_("Out of memory"));
return (-1);
More information about the grass-commit
mailing list