basevideocodec: fully free video frame

This commit is contained in:
Mark Nauwelaerts 2011-03-29 15:41:55 +02:00
parent a085acb586
commit 04f4a583dd
2 changed files with 6 additions and 0 deletions

View file

@ -178,5 +178,9 @@ gst_base_video_codec_free_frame (GstVideoFrame * frame)
gst_buffer_unref (frame->sink_buffer); gst_buffer_unref (frame->sink_buffer);
} }
if (frame->src_buffer) {
gst_buffer_unref (frame->src_buffer);
}
g_free (frame); g_free (frame);
} }

View file

@ -833,6 +833,8 @@ gst_base_video_encoder_finish_frame (GstBaseVideoEncoder * base_video_encoder,
frame->src_buffer); frame->src_buffer);
} }
/* handed out */
frame->src_buffer = NULL;
gst_base_video_codec_free_frame (frame); gst_base_video_codec_free_frame (frame);
return ret; return ret;