avviddec: Fix typo that duplicated closed caption meta
authorVivia Nikolaidou <vivia@ahiru.eu>
Mon, 6 Jul 2020 21:33:22 +0000 (00:33 +0300)
committerVivia Nikolaidou <vivia@ahiru.eu>
Mon, 6 Jul 2020 21:33:22 +0000 (00:33 +0300)
We examined the output buffer, instead of the input buffer, for
existence of cc meta.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-libav/-/merge_requests/83>

ext/libav/gstavviddec.c

index 502390d..a383cb8 100644 (file)
@@ -1697,7 +1697,7 @@ gst_ffmpegviddec_video_frame (GstFFMpegVidDec * ffmpegdec,
       GST_MEMDUMP ("A53 CC", side_data->data, side_data->size);
 
       /* do not add closed caption meta if it already exists */
-      if (!gst_buffer_get_meta (out_frame->output_buffer,
+      if (!gst_buffer_get_meta (out_frame->input_buffer,
               GST_VIDEO_CAPTION_META_API_TYPE)) {
         out_frame->output_buffer =
             gst_buffer_make_writable (out_frame->output_buffer);