Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | From bcb2b8b6f49e7c66124a4f5e07dea829d5ebfe59 Mon Sep 17 00:00:00 2001 |
| 2 | From: Lyon Wang <lyon.wang@freescale.com> |
| 3 | Date: Mon, 15 Dec 2014 16:52:07 +0800 |
| 4 | Subject: [PATCH] handle audio/video decoder error |
| 5 | |
| 6 | When there is input data and no output data to the end of the stream, it will |
| 7 | send GST_ELEMENT_ERROR, So the clips playing will quit. |
| 8 | However, if only one of the tracks is corrupt, there is no need to quit other |
| 9 | tracks playing. |
| 10 | |
| 11 | The patch comments the GST_ELEMENT_ERROR() and just add GST_ERROR_OBJECT() |
| 12 | information instead. |
| 13 | |
| 14 | Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=741542] |
| 15 | |
| 16 | Signed-off-by: Lyon Wang <lyon.wang@freescale.com> |
| 17 | --- |
| 18 | gst-libs/gst/audio/gstaudiodecoder.c | 5 +++-- |
| 19 | gst-libs/gst/video/gstvideodecoder.c | 5 +++-- |
| 20 | 2 files changed, 6 insertions(+), 4 deletions(-) |
| 21 | mode change 100644 => 100755 gst-libs/gst/audio/gstaudiodecoder.c |
| 22 | mode change 100644 => 100755 gst-libs/gst/video/gstvideodecoder.c |
| 23 | |
| 24 | diff --git a/gst-libs/gst/audio/gstaudiodecoder.c b/gst-libs/gst/audio/gstaudiodecoder.c |
| 25 | old mode 100644 |
| 26 | new mode 100755 |
| 27 | index c2e7a28..891df0a |
| 28 | --- a/gst-libs/gst/audio/gstaudiodecoder.c |
| 29 | +++ b/gst-libs/gst/audio/gstaudiodecoder.c |
| 30 | @@ -2123,9 +2123,10 @@ gst_audio_decoder_sink_eventfunc (GstAudioDecoder * dec, GstEvent * event) |
| 31 | GST_AUDIO_DECODER_STREAM_UNLOCK (dec); |
| 32 | |
| 33 | if (dec->priv->ctx.had_input_data && !dec->priv->ctx.had_output_data) { |
| 34 | - GST_ELEMENT_ERROR (dec, STREAM, DECODE, |
| 35 | + /* GST_ELEMENT_ERROR (dec, STREAM, DECODE, |
| 36 | ("No valid frames decoded before end of stream"), |
| 37 | - ("no valid frames found")); |
| 38 | + ("no valid frames found")); */ |
| 39 | + GST_ERROR_OBJECT(dec, "No valid frames decoded before end of stream"); |
| 40 | } |
| 41 | |
| 42 | /* send taglist if no valid frame is decoded util EOS */ |
| 43 | diff --git a/gst-libs/gst/video/gstvideodecoder.c b/gst-libs/gst/video/gstvideodecoder.c |
| 44 | old mode 100644 |
| 45 | new mode 100755 |
| 46 | index ac581e1..4278bcd |
| 47 | --- a/gst-libs/gst/video/gstvideodecoder.c |
| 48 | +++ b/gst-libs/gst/video/gstvideodecoder.c |
| 49 | @@ -1068,9 +1068,10 @@ gst_video_decoder_sink_event_default (GstVideoDecoder * decoder, |
| 50 | |
| 51 | /* Error out even if EOS was ok when we had input, but no output */ |
| 52 | if (ret && priv->had_input_data && !priv->had_output_data) { |
| 53 | - GST_ELEMENT_ERROR (decoder, STREAM, DECODE, |
| 54 | + /* GST_ELEMENT_ERROR (decoder, STREAM, DECODE, |
| 55 | ("No valid frames decoded before end of stream"), |
| 56 | - ("no valid frames found")); |
| 57 | + ("no valid frames found")); */ |
| 58 | + GST_ERROR_OBJECT(decoder, "No valid frames decoded before end of stream"); |
| 59 | } |
| 60 | |
| 61 | /* Forward EOS immediately. This is required because no |
| 62 | -- |
| 63 | 1.7.9.5 |
| 64 | |