Permalink
Browse files

shorten: pass on error value from allocate_buffers() instead of retur…

…ning -1
  • Loading branch information...
1 parent 9e5e2c2 commit a8055992c0a15b6fc76c593c8cbee9a611ca28ff @justinruggles committed Sep 16, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 libavcodec/shorten.c
View
@@ -306,7 +306,7 @@ static int decode_subframe_lpc(ShortenContext *s, int channel,
static int read_header(ShortenContext *s)
{
- int i;
+ int i, ret;
int maxnlpc = 0;
/* shorten signature */
if (get_bits_long(&s->gb, 32) != AV_RB32("ajkg")) {
@@ -342,8 +342,8 @@ static int read_header(ShortenContext *s)
}
s->nwrap = FFMAX(NWRAP, maxnlpc);
- if (allocate_buffers(s))
- return -1;
+ if ((ret = allocate_buffers(s)) < 0)
+ return ret;
init_offset(s);

0 comments on commit a805599

Please sign in to comment.