summaryrefslogtreecommitdiff
path: root/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0006-taglist-not-send-to-down-stream-if-all-the-frame-cor.patch
blob: c8fd2eb352a3d2f2f9a17ac122a2d4e8cc8c082e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
From 1dfe4f567771217bb33c57e8480b99969f119ded Mon Sep 17 00:00:00 2001
From: Lyon Wang <lyon.wang@freescale.com>
Date: Wed, 21 Oct 2015 16:35:43 +0800
Subject: [PATCH 07/16] taglist not send to down stream if all the frame
 corrupted

https://bugzilla.gnome.org/show_bug.cgi?id=737246

Upstream-Status: Pending

Signed-off-by: Jian Li <lj.qfy.sh@gmail.com>
---
 gst-libs/gst/audio/gstaudiodecoder.c | 9 +++++++++
 gst-libs/gst/video/gstvideodecoder.c | 8 ++++++++
 2 files changed, 17 insertions(+)

diff --git a/gst-libs/gst/audio/gstaudiodecoder.c b/gst-libs/gst/audio/gstaudiodecoder.c
index 333dbf9..d082380 100644
--- a/gst-libs/gst/audio/gstaudiodecoder.c
+++ b/gst-libs/gst/audio/gstaudiodecoder.c
@@ -2261,6 +2261,15 @@ gst_audio_decoder_sink_eventfunc (GstAudioDecoder * dec, GstEvent * event)
             ("no valid frames found"));
       }
 
+      /* send taglist if no valid frame is decoded util EOS */
+      if (dec->priv->taglist && dec->priv->taglist_changed) {
+        GST_DEBUG_OBJECT (dec, "codec tag %" GST_PTR_FORMAT, dec->priv->taglist);
+        if (!gst_tag_list_is_empty (dec->priv->taglist))
+          gst_audio_decoder_push_event (dec,
+              gst_event_new_tag (gst_tag_list_ref (dec->priv->taglist)));
+        dec->priv->taglist_changed = FALSE;
+      }
+
       /* Forward EOS because no buffer or serialized event will come after
        * EOS and nothing could trigger another _finish_frame() call. */
       if (dec->priv->pending_events)
diff --git a/gst-libs/gst/video/gstvideodecoder.c b/gst-libs/gst/video/gstvideodecoder.c
index b91a32e..1f89e10 100644
--- a/gst-libs/gst/video/gstvideodecoder.c
+++ b/gst-libs/gst/video/gstvideodecoder.c
@@ -1165,6 +1165,14 @@ gst_video_decoder_sink_event_default (GstVideoDecoder * decoder,
        * parent class' ::sink_event() until a later time.
        */
       forward_immediate = TRUE;
+
+      /* send taglist if no valid frame is decoded util EOS */
+      if (decoder->priv->tags && decoder->priv->tags_changed) {
+        gst_video_decoder_push_event (decoder,
+            gst_event_new_tag (gst_tag_list_ref (decoder->priv->tags)));
+        decoder->priv->tags_changed = FALSE;
+      }
+
       break;
     }
     case GST_EVENT_GAP:
-- 
1.9.1