summaryrefslogtreecommitdiff
path: root/libavcodec/xsubdec.c
diff options
context:
space:
mode:
authorClément Bœsch <u@pkh.me>2016-06-21 22:40:56 +0200
committerClément Bœsch <u@pkh.me>2016-06-21 22:40:56 +0200
commita4403e49b93a68f8c197615f346f2f891c35a4e5 (patch)
treef478c7f50367730937be83aec4c9ae8a9ba4432a /libavcodec/xsubdec.c
parent00e122bc0f2a4d867797f593770f9902f275b864 (diff)
parentb7e64fba7f37cc0399beae844f0a5dbef9219376 (diff)
downloadffmpeg-a4403e49b93a68f8c197615f346f2f891c35a4e5.tar.gz
Merge commit 'b7e64fba7f37cc0399beae844f0a5dbef9219376'
* commit 'b7e64fba7f37cc0399beae844f0a5dbef9219376': Reduce the scope of some variables Merged-by: Clément Bœsch <u@pkh.me>
Diffstat (limited to 'libavcodec/xsubdec.c')
-rw-r--r--libavcodec/xsubdec.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/xsubdec.c b/libavcodec/xsubdec.c
index 540607aa74..b024535df6 100644
--- a/libavcodec/xsubdec.c
+++ b/libavcodec/xsubdec.c
@@ -57,8 +57,6 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
int64_t packet_time = 0;
GetBitContext gb;
int has_alpha = avctx->codec_tag == MKTAG('D','X','S','A');
- AVSubtitleRect *rect;
- int j;
// check that at least header fits
if (buf_size < 27 + 7 * 2 + 4 * (3 + has_alpha)) {
@@ -134,11 +132,15 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
#if FF_API_AVPICTURE
FF_DISABLE_DEPRECATION_WARNINGS
+{
+ AVSubtitleRect *rect;
+ int j;
rect = sub->rects[0];
for (j = 0; j < 4; j++) {
rect->pict.data[j] = rect->data[j];
rect->pict.linesize[j] = rect->linesize[j];
}
+}
FF_ENABLE_DEPRECATION_WARNINGS
#endif