This avoids unused variable warnings after the next version bump.
Also drop a trace level av_log() call that is in the way.
i = 0;
for (display = ctx->display_list; display; display = display->next) {
- int j;
region = get_region(ctx, display->region_id);
rect = sub->rects[i];
#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
if (h < 0)
h = 0;
if (w > 0 && h > 0) {
- int j;
- AVSubtitleRect *rect;
if (sub_header->rects) {
for (i = 0; i < sub_header->num_rects; i++) {
av_freep(&sub_header->rects[i]->data[0]);
#if FF_API_AVPICTURE
FF_DISABLE_DEPRECATION_WARNINGS
+{
+ int j;
+ AVSubtitleRect *rect;
rect = sub_header->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
}
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;
/* 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);
}
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]) {
#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
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));
#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
static int v4l2_read_packet(AVFormatContext *s1, AVPacket *pkt)
{
- struct video_data *s = s1->priv_data;
#if FF_API_CODED_FRAME
FF_DISABLE_DEPRECATION_WARNINGS
+ struct video_data *s = s1->priv_data;
AVFrame *frame = s1->streams[0]->codec->coded_frame;
FF_ENABLE_DEPRECATION_WARNINGS
#endif
goto fail;
if (pkt) {
+#if FF_API_COMPUTE_PKT_FIELDS2
AVStream *st = s->streams[pkt->stream_index];
av_log(s, AV_LOG_TRACE, "av_interleaved_write_frame size:%d dts:%" PRId64 " pts:%" PRId64 "\n",
pkt->size, pkt->dts, pkt->pts);
-#if FF_API_COMPUTE_PKT_FIELDS2
if ((ret = compute_pkt_fields2(s, st, pkt)) < 0 && !(s->oformat->flags & AVFMT_NOTIMESTAMPS))
goto fail;
#endif