mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +00:00
av: update to use AVOption variants.
This commit is contained in:
parent
41e117562c
commit
5f03a7d869
8 changed files with 12 additions and 12 deletions
|
@ -45,7 +45,7 @@ gst_ffmpeg_avcodec_open (AVCodecContext * avctx, AVCodec * codec)
|
|||
int ret;
|
||||
|
||||
g_static_mutex_lock (&gst_avcodec_mutex);
|
||||
ret = avcodec_open (avctx, codec);
|
||||
ret = avcodec_open2 (avctx, codec, NULL);
|
||||
g_static_mutex_unlock (&gst_avcodec_mutex);
|
||||
|
||||
return ret;
|
||||
|
@ -69,7 +69,7 @@ gst_ffmpeg_av_find_stream_info (AVFormatContext * ic)
|
|||
int ret;
|
||||
|
||||
g_static_mutex_lock (&gst_avcodec_mutex);
|
||||
ret = av_find_stream_info (ic);
|
||||
ret = avformat_find_stream_info (ic, NULL);
|
||||
g_static_mutex_unlock (&gst_avcodec_mutex);
|
||||
|
||||
return ret;
|
||||
|
|
|
@ -313,7 +313,7 @@ gst_ffmpegauddec_set_format (GstAudioDecoder * decoder, GstCaps * caps)
|
|||
gst_ffmpegauddec_close (ffmpegdec);
|
||||
|
||||
/* and reset the defaults that were set when a context is created */
|
||||
avcodec_get_context_defaults (ffmpegdec->context);
|
||||
avcodec_get_context_defaults3 (ffmpegdec->context, NULL);
|
||||
}
|
||||
|
||||
/* get size and so */
|
||||
|
|
|
@ -167,7 +167,7 @@ static void
|
|||
gst_ffmpegaudenc_init (GstFFMpegAudEnc * ffmpegaudenc)
|
||||
{
|
||||
/* ffmpeg objects */
|
||||
ffmpegaudenc->context = avcodec_alloc_context ();
|
||||
ffmpegaudenc->context = avcodec_alloc_context3 (NULL);
|
||||
ffmpegaudenc->opened = FALSE;
|
||||
|
||||
gst_audio_encoder_set_drainable (GST_AUDIO_ENCODER (ffmpegaudenc), TRUE);
|
||||
|
@ -243,7 +243,7 @@ gst_ffmpegaudenc_set_format (GstAudioEncoder * encoder, GstAudioInfo * info)
|
|||
}
|
||||
|
||||
/* set defaults */
|
||||
avcodec_get_context_defaults (ffmpegaudenc->context);
|
||||
avcodec_get_context_defaults3 (ffmpegaudenc->context, NULL);
|
||||
|
||||
/* if we set it in _getcaps we should set it also in _link */
|
||||
ffmpegaudenc->context->strict_std_compliance = -1;
|
||||
|
|
|
@ -750,9 +750,9 @@ gst_ffmpeg_cfg_install_property (GstFFMpegVidEncClass * klass, guint base)
|
|||
prop_id = base;
|
||||
g_return_if_fail (base > 0);
|
||||
|
||||
ctx = avcodec_alloc_context ();
|
||||
ctx = avcodec_alloc_context3 (NULL);
|
||||
if (ctx)
|
||||
avcodec_get_context_defaults (ctx);
|
||||
avcodec_get_context_defaults3 (ctx, NULL);
|
||||
else
|
||||
g_warning ("could not get context");
|
||||
|
||||
|
|
|
@ -203,7 +203,7 @@ gst_ffmpegdeinterlace_sink_setcaps (GstPad * pad, GstCaps * caps)
|
|||
}
|
||||
gst_ffmpegdeinterlace_update_passthrough (deinterlace);
|
||||
|
||||
ctx = avcodec_alloc_context ();
|
||||
ctx = avcodec_alloc_context3 (NULL);
|
||||
ctx->width = deinterlace->width;
|
||||
ctx->height = deinterlace->height;
|
||||
ctx->pix_fmt = PIX_FMT_NB;
|
||||
|
|
|
@ -656,7 +656,7 @@ gst_ffmpegmux_collected (GstCollectPads * pads, gpointer user_data)
|
|||
}
|
||||
|
||||
/* now open the mux format */
|
||||
if (av_write_header (ffmpegmux->context) < 0) {
|
||||
if (avformat_write_header (ffmpegmux->context, NULL) < 0) {
|
||||
GST_ELEMENT_ERROR (ffmpegmux, LIBRARY, SETTINGS, (NULL),
|
||||
("Failed to write file header - check codec settings"));
|
||||
return GST_FLOW_ERROR;
|
||||
|
|
|
@ -371,7 +371,7 @@ gst_ffmpegviddec_set_format (GstVideoDecoder * decoder,
|
|||
gst_ffmpegviddec_close (ffmpegdec);
|
||||
|
||||
/* and reset the defaults that were set when a context is created */
|
||||
avcodec_get_context_defaults (ffmpegdec->context);
|
||||
avcodec_get_context_defaults3 (ffmpegdec->context, NULL);
|
||||
}
|
||||
|
||||
/* set buffer functions */
|
||||
|
|
|
@ -236,7 +236,7 @@ gst_ffmpegvidenc_init (GstFFMpegVidEnc * ffmpegenc)
|
|||
ffmpegenc->lmax = 31;
|
||||
ffmpegenc->max_key_interval = 0;
|
||||
|
||||
gst_ffmpeg_cfg_set_defaults (ffmpegenc);
|
||||
gst_ffmpeg_cfg_set_defaults3 (ffmpegenc, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -398,7 +398,7 @@ gst_ffmpegvidenc_set_format (GstVideoEncoder * encoder,
|
|||
}
|
||||
|
||||
/* set defaults */
|
||||
avcodec_get_context_defaults (ffmpegenc->context);
|
||||
avcodec_get_context_defaults3 (ffmpegenc->context, NULL);
|
||||
|
||||
/* if we set it in _getcaps we should set it also in _link */
|
||||
ffmpegenc->context->strict_std_compliance = -1;
|
||||
|
|
Loading…
Reference in a new issue