mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
libzvbi-teletextdec: dont ignore memory allocation error silently
Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
parent
3c4b5275b6
commit
4947b0624b
@ -440,6 +440,8 @@ teletext_decode_frame(AVCodecContext *avctx,
|
|||||||
if (sub->rects) {
|
if (sub->rects) {
|
||||||
sub->num_rects = 1;
|
sub->num_rects = 1;
|
||||||
sub->rects[0] = ctx->pages->sub_rect;
|
sub->rects[0] = ctx->pages->sub_rect;
|
||||||
|
} else {
|
||||||
|
ret = AVERROR(ENOMEM);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
av_log(avctx, AV_LOG_DEBUG, "sending empty sub\n");
|
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->pages[i] = ctx->pages[i + 1];
|
||||||
ctx->nb_pages--;
|
ctx->nb_pages--;
|
||||||
|
|
||||||
*data_size = 1;
|
if (ret >= 0)
|
||||||
|
*data_size = 1;
|
||||||
} else
|
} else
|
||||||
*data_size = 0;
|
*data_size = 0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user