diff options
author | Marton Balint <cus@passwd.hu> | 2013-10-25 21:02:00 +0200 |
---|---|---|
committer | Marton Balint <cus@passwd.hu> | 2013-11-10 20:00:01 +0100 |
commit | 4947b0624b4f6f56fb8d9da1568441329e9650a1 (patch) | |
tree | 44b9fb60303d807c45d134c9b1bd5b9a581acba6 | |
parent | 3c4b5275b6dd76ef0be2f77ea13b03968d66ed1b (diff) | |
download | ffmpeg-4947b0624b4f6f56fb8d9da1568441329e9650a1.tar.gz |
libzvbi-teletextdec: dont ignore memory allocation error silently
Signed-off-by: Marton Balint <cus@passwd.hu>
-rw-r--r-- | libavcodec/libzvbi-teletextdec.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/libzvbi-teletextdec.c b/libavcodec/libzvbi-teletextdec.c index b22a87e860..9a0deba0f3 100644 --- a/libavcodec/libzvbi-teletextdec.c +++ b/libavcodec/libzvbi-teletextdec.c @@ -440,6 +440,8 @@ teletext_decode_frame(AVCodecContext *avctx, if (sub->rects) { sub->num_rects = 1; sub->rects[0] = ctx->pages->sub_rect; + } else { + ret = AVERROR(ENOMEM); } } else { av_log(avctx, AV_LOG_DEBUG, "sending empty sub\n"); @@ -452,7 +454,8 @@ teletext_decode_frame(AVCodecContext *avctx, ctx->pages[i] = ctx->pages[i + 1]; ctx->nb_pages--; - *data_size = 1; + if (ret >= 0) + *data_size = 1; } else *data_size = 0; |