guint padded_size;
gboolean current_dr; /* if direct rendering is enabled */
- gboolean extra_ref; /* keep extra ref around in get/release */
/* some properties */
enum AVDiscard skip_frame;
/* figure out if we can use direct rendering */
ffmpegdec->current_dr = FALSE;
- ffmpegdec->extra_ref = FALSE;
if (ffmpegdec->direct_rendering) {
GST_DEBUG_OBJECT (ffmpegdec, "trying to enable direct rendering");
if (oclass->in_plugin->capabilities & CODEC_CAP_DR1) {
GST_DEBUG_OBJECT (ffmpegdec, "disable direct rendering setup for H264");
/* does not work, many stuff reads outside of the planes */
ffmpegdec->current_dr = FALSE;
- ffmpegdec->extra_ref = TRUE;
} else if ((oclass->in_plugin->id == CODEC_ID_SVQ1) ||
(oclass->in_plugin->id == CODEC_ID_VP5) ||
(oclass->in_plugin->id == CODEC_ID_VP6) ||
"disable direct rendering setup for broken stride support");
/* does not work, uses a incompatible stride. See #610613 */
ffmpegdec->current_dr = FALSE;
- ffmpegdec->extra_ref = TRUE;
} else {
GST_DEBUG_OBJECT (ffmpegdec, "enabled direct rendering");
ffmpegdec->current_dr = TRUE;
GST_LOG_OBJECT (ffmpegdec, "buffer data %p, size %" G_GSIZE_FORMAT, data,
size);
- edge =
- ffmpegdec->context->
- flags & CODEC_FLAG_EMU_EDGE ? 0 : avcodec_get_edge_width ();
+ edge = context->flags & CODEC_FLAG_EMU_EDGE ? 0 : avcodec_get_edge_width ();
data += (edge * width) + edge;
/* copy the right pointers and strides in the picture object */
avcodec_align_dimensions2 (ffmpegdec->context, &width, &height,
linesize_align);
edge =
- ffmpegdec->context->
- flags & CODEC_FLAG_EMU_EDGE ? 0 : avcodec_get_edge_width ();
+ ffmpegdec->
+ context->flags & CODEC_FLAG_EMU_EDGE ? 0 : avcodec_get_edge_width ();
/* increase the size for the padding */
width += edge << 1;
height += edge << 1;