summaryrefslogtreecommitdiff
path: root/libavcodec/xsubdec.c
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2016-05-04 00:15:41 +0200
committerDiego Biurrun <diego@biurrun.de>2016-05-11 12:21:25 +0200
commitb7e64fba7f37cc0399beae844f0a5dbef9219376 (patch)
tree9e23cf4f3d2067b97b0005c251c4c78e28ce2400 /libavcodec/xsubdec.c
parentbc2a32969eb4db17677971def5ad5b936d9d1648 (diff)
Reduce the scope of some variables
This avoids unused variable warnings after the next version bump. Also drop a trace level av_log() call that is in the way.
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 7e25787989..3af300c22b 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;
memset(sub, 0, sizeof(*sub));
@@ -135,11 +133,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