GstPad *sinkpad;
AVCodecContext *context;
- AVPicture *picture;
+ AVFrame *picture;
};
typedef struct _GstFFMpegDecClass GstFFMpegDecClass;
gst_element_add_pad (GST_ELEMENT (ffmpegdec), ffmpegdec->sinkpad);
gst_element_add_pad (GST_ELEMENT (ffmpegdec), ffmpegdec->srcpad);
- ffmpegdec->picture = g_malloc0 (sizeof (AVPicture));
+ ffmpegdec->picture = g_malloc0 (sizeof (AVFrame));
}
static void
GstFFMpegEnc *ffmpegenc = (GstFFMpegEnc *)(gst_pad_get_parent (pad));
gpointer data;
gint size, frame_size;
- AVPicture picture, rpicture, *toencode;
+ AVFrame picture, rpicture, *toencode;
gboolean free_data = FALSE, free_res = FALSE;
data = GST_BUFFER_DATA (inbuf);
}
*/
- avpicture_fill (&picture, data, PIX_FMT_YUV420P, ffmpegenc->in_width, ffmpegenc->in_height);
+ avpicture_fill ((AVPicture*)&picture, data, PIX_FMT_YUV420P, ffmpegenc->in_width, ffmpegenc->in_height);
toencode = &picture;
if (ffmpegenc->need_resample) {
guint8 *rdata;
rdata = g_malloc ((rframe_size * 3)/2);
- avpicture_fill (&rpicture, rdata, PIX_FMT_YUV420P, ffmpegenc->context->width, ffmpegenc->context->height);
+ avpicture_fill ((AVPicture*)&rpicture, rdata, PIX_FMT_YUV420P, ffmpegenc->context->width, ffmpegenc->context->height);
free_res = TRUE;
toencode = &rpicture;
- img_resample (ffmpegenc->resample, &rpicture, &picture);
+ img_resample (ffmpegenc->resample, (AVPicture*)&rpicture, (AVPicture*)&picture);
}
outbuf = gst_buffer_new ();
GstPad *sinkpad;
AVCodecContext *context;
- AVPicture *picture;
+ AVFrame *picture;
};
typedef struct _GstFFMpegMuxClass GstFFMpegMuxClass;
gst_element_add_pad (GST_ELEMENT (ffmpegmux), ffmpegmux->sinkpad);
gst_element_add_pad (GST_ELEMENT (ffmpegmux), ffmpegmux->srcpad);
- ffmpegmux->picture = g_malloc0 (sizeof (AVPicture));
+ ffmpegmux->picture = g_malloc0 (sizeof (AVFrame));
}
static void