Patch attached. Will apply it tonight unless there are objections
together with the other declaration-after-statement and unused-variable
patch.
Btw: I see no value in adhering to this ancient C90 rule. Can't we just
drop it?
- Andreas
From f8405e877a434ca0b390b5d7f43599cde00a7974 Mon Sep 17 00:00:00 2001
From: Andreas Rheinhardt <andreas.rheinha...@outlook.com>
Date: Sun, 30 Mar 2025 12:06:13 +0200
Subject: [PATCH] avformat/rtpenc: Fix declaration-after-statement warning
Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@outlook.com>
---
libavformat/rtpenc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c
index 8b989dca71..77cdd08a44 100644
--- a/libavformat/rtpenc.c
+++ b/libavformat/rtpenc.c
@@ -643,11 +643,11 @@ static int rtp_write_packet(AVFormatContext *s1, AVPacket *pkt)
break;
case AV_CODEC_ID_BITPACKED:
case AV_CODEC_ID_RAWVIDEO: {
+ int interlaced = st->codecpar->field_order != AV_FIELD_PROGRESSIVE;
if (st->codecpar->width <= 0 || st->codecpar->height <= 0) {
av_log(s1, AV_LOG_ERROR, "dimensions not set\n");
return AVERROR(EINVAL);
}
- int interlaced = st->codecpar->field_order != AV_FIELD_PROGRESSIVE;
ff_rtp_send_raw_rfc4175(s1, pkt->data, size, interlaced, 0);
if (interlaced)
--
2.45.2
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".