summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavcodec/dvbsubdec.c5
-rw-r--r--libavcodec/mpegvideo_enc.c4
-rw-r--r--libavcodec/pgssubdec.c6
-rw-r--r--libavcodec/xsubdec.c6
-rw-r--r--libavdevice/v4l2.c2
5 files changed, 15 insertions, 8 deletions
diff --git a/libavcodec/dvbsubdec.c b/libavcodec/dvbsubdec.c
index a4663d997f..e9f4765b15 100644
--- a/libavcodec/dvbsubdec.c
+++ b/libavcodec/dvbsubdec.c
@@ -827,7 +827,7 @@ static int save_subtitle_set(AVCodecContext *avctx, AVSubtitle *sub, int *got_ou
AVSubtitleRect *rect;
DVBSubCLUT *clut;
uint32_t *clut_table;
- int i,j;
+ int i;
int offset_x=0, offset_y=0;
int ret = 0;
@@ -924,10 +924,13 @@ static int save_subtitle_set(AVCodecContext *avctx, AVSubtitle *sub, int *got_ou
#if FF_API_AVPICTURE
FF_DISABLE_DEPRECATION_WARNINGS
+{
+ int j;
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
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 2e12a3dddc..87d795478a 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -2931,7 +2931,7 @@ int ff_mpv_reallocate_putbitbuffer(MpegEncContext *s, size_t threshold, size_t s
static int encode_thread(AVCodecContext *c, void *arg){
MpegEncContext *s= *(void**)arg;
- int mb_x, mb_y, pdif = 0;
+ int mb_x, mb_y;
int chr_h= 16>>s->chroma_y_shift;
int i, j;
MpegEncContext best_s = { 0 }, backup_s;
@@ -3569,7 +3569,7 @@ FF_DISABLE_DEPRECATION_WARNINGS
/* Send the last GOB if RTP */
if (s->avctx->rtp_callback) {
int number_mb = (mb_y - s->resync_mb_y)*s->mb_width - s->resync_mb_x;
- pdif = put_bits_ptr(&s->pb) - s->ptr_lastgob;
+ int pdif = put_bits_ptr(&s->pb) - s->ptr_lastgob;
/* Call the RTP callback to send the last GOB */
emms_c();
s->avctx->rtp_callback(s->avctx, s->ptr_lastgob, pdif, number_mb);
diff --git a/libavcodec/pgssubdec.c b/libavcodec/pgssubdec.c
index 880fc96282..cef477d8c2 100644
--- a/libavcodec/pgssubdec.c
+++ b/libavcodec/pgssubdec.c
@@ -529,8 +529,6 @@ static int display_end_segment(AVCodecContext *avctx, void *data,
}
for (i = 0; i < ctx->presentation.object_count; i++) {
PGSSubObject *object;
- AVSubtitleRect *rect;
- int j;
sub->rects[i] = av_mallocz(sizeof(*sub->rects[0]));
if (!sub->rects[i]) {
@@ -597,11 +595,15 @@ static int display_end_segment(AVCodecContext *avctx, void *data,
#if FF_API_AVPICTURE
FF_DISABLE_DEPRECATION_WARNINGS
+{
+ AVSubtitleRect *rect;
+ int j;
rect = sub->rects[i];
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
}
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
diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index c8915e0067..9153ad4302 100644
--- a/libavdevice/v4l2.c
+++ b/libavdevice/v4l2.c
@@ -971,9 +971,9 @@ fail:
static int v4l2_read_packet(AVFormatContext *ctx, AVPacket *pkt)
{
- struct video_data *s = ctx->priv_data;
#if FF_API_CODED_FRAME
FF_DISABLE_DEPRECATION_WARNINGS
+ struct video_data *s = ctx->priv_data;
AVFrame *frame = ctx->streams[0]->codec->coded_frame;
FF_ENABLE_DEPRECATION_WARNINGS
#endif