Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Catch errors

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
  • Loading branch information...
commit 719e87d18720f7cfee3c271c6b13db9f8e34e3c2 1 parent 458f8cd
@felipec authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 gstavdec.c
View
4 gstavdec.c
@@ -190,6 +190,10 @@ pad_chain(GstPad *pad, GstBuffer *buf)
buffer_data = self->buffer_data + self->ring.in;
buffer_size = self->buffer_size - self->ring.in;
read = avcodec_decode_audio3(self->av_ctx, buffer_data, &buffer_size, &pkt);
+ if (read < 0) {
+ ret = GST_FLOW_ERROR;
+ break;
+ }
self->ring.in += buffer_size;
if (self->ring.in >= 2 * AVCODEC_MAX_AUDIO_FRAME_SIZE) {
Please sign in to comment.
Something went wrong with that request. Please try again.