mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-12-01 07:20:58 +00:00
libzvbi-teletextdec: fix AVSubtitleRect pict compatiblity code
Only set pict if we got a valid rect. Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
parent
03037a4aad
commit
5e9f14e4bf
@ -464,10 +464,6 @@ static int teletext_decode_frame(AVCodecContext *avctx, void *data, int *data_si
|
||||
if (sub->rects) {
|
||||
sub->num_rects = 1;
|
||||
sub->rects[0] = ctx->pages->sub_rect;
|
||||
} else {
|
||||
ret = AVERROR(ENOMEM);
|
||||
}
|
||||
|
||||
#if FF_API_AVPICTURE
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
for (j = 0; j < 4; j++) {
|
||||
@ -476,6 +472,9 @@ FF_DISABLE_DEPRECATION_WARNINGS
|
||||
}
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
#endif
|
||||
} else {
|
||||
ret = AVERROR(ENOMEM);
|
||||
}
|
||||
} else {
|
||||
av_log(avctx, AV_LOG_DEBUG, "sending empty sub\n");
|
||||
sub->rects = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user