mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 15:51:11 +00:00
drop incoming buffers giving errors
Original commit message from CVS: drop incoming buffers giving errors
This commit is contained in:
parent
71f892d3de
commit
75d9e267c6
2 changed files with 11 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
2004-07-07 Thomas Vander Stichele <thomas (at) apestaart (dot) org>
|
||||
|
||||
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_chain):
|
||||
drop incoming buffers that generate decoding errors
|
||||
|
||||
2004-07-07 Thomas Vander Stichele <thomas (at) apestaart (dot) org>
|
||||
|
||||
* ext/ffmpeg/gstffmpeg.c: (gst_ffmpeg_log_callback), (plugin_init):
|
||||
|
|
|
@ -433,9 +433,13 @@ gst_ffmpegdec_chain (GstPad * pad, GstData * _data)
|
|||
outbuf = gst_buffer_new_and_alloc (AVCODEC_MAX_AUDIO_FRAME_SIZE);
|
||||
len = avcodec_decode_audio (ffmpegdec->context,
|
||||
(int16_t *) GST_BUFFER_DATA (outbuf), &have_data, data, size);
|
||||
if (have_data < 0)
|
||||
GST_WARNING_OBJECT (ffmpegdec, "len %d, have_data: %d < 0 !",
|
||||
if (have_data < 0) {
|
||||
GST_WARNING_OBJECT (ffmpegdec,
|
||||
"FFmpeg error: len %d, have_data: %d < 0 !",
|
||||
len, have_data);
|
||||
gst_buffer_unref (inbuf);
|
||||
return;
|
||||
}
|
||||
|
||||
if (have_data) {
|
||||
GST_BUFFER_SIZE (outbuf) = have_data;
|
||||
|
|
Loading…
Reference in a new issue