diff mbox series

[FFmpeg-devel,14/14] avdevice/iec61883: #if unused code away, fix -O0 compilation

Message ID AM7PR03MB6660BC2983DEE4CE4EDB51C18F4C9@AM7PR03MB6660.eurprd03.prod.outlook.com
State Accepted
Commit ad0b4afec57381c74f57dd3f3c65c49cc406c9fd
Headers show
Series [FFmpeg-devel] avformat/Makefile: Add missing libamqp->urldecode dependency | expand


Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Andreas Rheinhardt Jan. 6, 2022, 8:07 p.m. UTC
iec61883_parse_queue_hdv() is only called when the mpegts-demuxer
is available and can be optimized away when not. Yet this
optimization is not a given and i fails with e.g. GCC 11 when
using -O0 in which case one will get a compilation error
because the call to the unavailable avpriv_mpegts_parse_packet()
is not optimized away. Therefore #if the offending code away
in this case.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
 libavdevice/iec61883.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series


diff --git a/libavdevice/iec61883.c b/libavdevice/iec61883.c
index e7b71c757a..72e14abff2 100644
--- a/libavdevice/iec61883.c
+++ b/libavdevice/iec61883.c
@@ -220,6 +220,7 @@  static int iec61883_parse_queue_dv(struct iec61883_data *dv, AVPacket *pkt)
 static int iec61883_parse_queue_hdv(struct iec61883_data *dv, AVPacket *pkt)
     DVPacket *packet;
     int size;
@@ -235,7 +236,7 @@  static int iec61883_parse_queue_hdv(struct iec61883_data *dv, AVPacket *pkt)
         if (size > 0)
             return size;
     return -1;