diff --git a/ext/libav/gstavcodecmap.c b/ext/libav/gstavcodecmap.c index bc538ec4b5..2dd123ace9 100644 --- a/ext/libav/gstavcodecmap.c +++ b/ext/libav/gstavcodecmap.c @@ -1865,23 +1865,23 @@ gst_ffmpeg_pixfmt_to_caps (enum PixelFormat pix_fmt, AVCodecContext * context, */ static GstCaps * -gst_ffmpeg_smpfmt_to_caps (enum SampleFormat sample_fmt, +gst_ffmpeg_smpfmt_to_caps (enum AVSampleFormat sample_fmt, AVCodecContext * context, enum CodecID codec_id) { GstCaps *caps = NULL; GstAudioFormat format; switch (sample_fmt) { - case SAMPLE_FMT_S16: + case AV_SAMPLE_FMT_S16: format = GST_AUDIO_FORMAT_S16; break; - case SAMPLE_FMT_S32: + case AV_SAMPLE_FMT_S32: format = GST_AUDIO_FORMAT_S32; break; - case SAMPLE_FMT_FLT: + case AV_SAMPLE_FMT_FLT: format = GST_AUDIO_FORMAT_F32; break; - case SAMPLE_FMT_DBL: + case AV_SAMPLE_FMT_DBL: format = GST_AUDIO_FORMAT_F64; break; default: @@ -1930,12 +1930,12 @@ gst_ffmpeg_codectype_to_audio_caps (AVCodecContext * context, } } else { GstCaps *temp; - enum SampleFormat i; + enum AVSampleFormat i; AVCodecContext ctx = { 0, }; ctx.channels = -1; caps = gst_caps_new_empty (); - for (i = 0; i <= SAMPLE_FMT_DBL; i++) { + for (i = 0; i <= AV_SAMPLE_FMT_DBL; i++) { temp = gst_ffmpeg_smpfmt_to_caps (i, encode ? &ctx : NULL, codec_id); if (temp != NULL) { gst_caps_append (caps, temp); @@ -2038,16 +2038,16 @@ gst_ffmpeg_caps_to_smpfmt (const GstCaps * caps, switch (format) { case GST_AUDIO_FORMAT_F32: - context->sample_fmt = SAMPLE_FMT_FLT; + context->sample_fmt = AV_SAMPLE_FMT_FLT; break; case GST_AUDIO_FORMAT_F64: - context->sample_fmt = SAMPLE_FMT_DBL; + context->sample_fmt = AV_SAMPLE_FMT_DBL; break; case GST_AUDIO_FORMAT_S32: - context->sample_fmt = SAMPLE_FMT_S32; + context->sample_fmt = AV_SAMPLE_FMT_S32; break; case GST_AUDIO_FORMAT_S16: - context->sample_fmt = SAMPLE_FMT_S16; + context->sample_fmt = AV_SAMPLE_FMT_S16; break; default: break; diff --git a/ext/libav/gstavutils.c b/ext/libav/gstavutils.c index 687f01d77a..8555d8d15b 100644 --- a/ext/libav/gstavutils.c +++ b/ext/libav/gstavutils.c @@ -39,21 +39,21 @@ gst_ffmpeg_get_codecid_longname (enum CodecID codec_id) } gint -av_smp_format_depth (enum SampleFormat smp_fmt) +av_smp_format_depth (enum AVSampleFormat smp_fmt) { gint depth = -1; switch (smp_fmt) { - case SAMPLE_FMT_U8: + case AV_SAMPLE_FMT_U8: depth = 1; break; - case SAMPLE_FMT_S16: + case AV_SAMPLE_FMT_S16: depth = 2; break; - case SAMPLE_FMT_S32: - case SAMPLE_FMT_FLT: + case AV_SAMPLE_FMT_S32: + case AV_SAMPLE_FMT_FLT: depth = 4; break; - case SAMPLE_FMT_DBL: + case AV_SAMPLE_FMT_DBL: depth = 8; break; default: diff --git a/ext/libav/gstavutils.h b/ext/libav/gstavutils.h index 0efa730f90..ebe49fb29d 100644 --- a/ext/libav/gstavutils.h +++ b/ext/libav/gstavutils.h @@ -89,7 +89,7 @@ G_CONST_RETURN gchar * gst_ffmpeg_get_codecid_longname (enum CodecID codec_id); gint -av_smp_format_depth(enum SampleFormat smp_fmt); +av_smp_format_depth(enum AVSampleFormat smp_fmt); GstBuffer * new_aligned_buffer (gint size); diff --git a/ext/libav/gstavviddec.c b/ext/libav/gstavviddec.c index d14e065af1..68f3c911a6 100644 --- a/ext/libav/gstavviddec.c +++ b/ext/libav/gstavviddec.c @@ -606,7 +606,6 @@ gst_ffmpegviddec_get_buffer (AVCodecContext * context, AVFrame * picture) /* tell ffmpeg we own this buffer, tranfer the ref we have on the buffer to * the opaque data. */ picture->type = FF_BUFFER_TYPE_USER; - picture->age = 256 * 256 * 256 * 64; GST_LOG_OBJECT (ffmpegdec, "returned frame %p", frame->output_buffer); diff --git a/ext/libav/gstavvidenc.c b/ext/libav/gstavvidenc.c index 5f81464e2b..2ef4acb91e 100644 --- a/ext/libav/gstavvidenc.c +++ b/ext/libav/gstavvidenc.c @@ -662,7 +662,7 @@ gst_ffmpegvidenc_handle_frame (GstVideoEncoder * encoder, GstVideoFrame vframe; if (GST_VIDEO_CODEC_FRAME_IS_FORCE_KEYFRAME (frame)) - ffmpegenc->picture->pict_type = FF_I_TYPE; + ffmpegenc->picture->pict_type = AV_PICTURE_TYPE_I; if (!gst_video_frame_map (&vframe, info, frame->input_buffer, GST_MAP_READ)) { GST_ERROR_OBJECT (encoder, "Failed to map input buffer");