From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
To: ffmpeg-devel@ffmpeg.org
Cc: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Subject: [FFmpeg-devel] [PATCH 11/12] avformat/rtsp: #if unused functions away, fix -O0 compilation
Date: Thu, 6 Jan 2022 19:47:11 +0100
Message-ID: <AM7PR03MB66602C838D92CCBC59EC85F48F4C9@AM7PR03MB6660.eurprd03.prod.outlook.com> (raw)
In-Reply-To: <AM7PR03MB6660A38F0890A5335301DD558F4C9@AM7PR03MB6660.eurprd03.prod.outlook.com>
parse_rtsp_message() is only called if the rtsp demuxer is enabled
and so it is normally compiled away if said demuxer is disabled.
Yet this does not happen when compiling with -O0 and this leads
to a linking failure because parse_rtsp_message() calls functions
that may not be available if the rtsp demuxer is disabled.
Fix this by properly #if'ing the unused functions away.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
libavformat/rtsp.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 1e091c7380..70c18941ca 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -246,6 +246,7 @@ static void finalize_rtp_handler_init(AVFormatContext *s, RTSPStream *rtsp_st,
}
}
+#if CONFIG_RTSP_DEMUXER
static int init_satip_stream(AVFormatContext *s)
{
RTSPState *rt = s->priv_data;
@@ -274,6 +275,7 @@ static int init_satip_stream(AVFormatContext *s)
}
return 0;
}
+#endif
/* parse the rtpmap description: <codec_name>/<clock_rate>[/<other params>] */
static int sdp_parse_rtpmap(AVFormatContext *s,
@@ -2006,6 +2008,7 @@ redirect:
#endif /* CONFIG_RTSP_DEMUXER || CONFIG_RTSP_MUXER */
#if CONFIG_RTPDEC
+#if CONFIG_RTSP_DEMUXER
static int parse_rtsp_message(AVFormatContext *s)
{
RTSPState *rt = s->priv_data;
@@ -2028,6 +2031,7 @@ static int parse_rtsp_message(AVFormatContext *s)
return 0;
}
+#endif
static int udp_read_packet(AVFormatContext *s, RTSPStream **prtsp_st,
uint8_t *buf, int buf_size, int64_t wait_end)
--
2.32.0
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2022-01-06 18:47 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-06 9:14 [FFmpeg-devel] [PATCH] avformat/Makefile: Add missing libamqp->urldecode dependency Andreas Rheinhardt
2022-01-06 10:52 ` [FFmpeg-devel] [PATCH 2/4] avformat/Makefile, amr: Add missing amr-demuxers->rawdec.o dependency Andreas Rheinhardt
2022-01-06 10:52 ` [FFmpeg-devel] [PATCH 3/4] avformat/amr: Don't reset AVFormatContext.priv_data Andreas Rheinhardt
2022-01-06 10:52 ` [FFmpeg-devel] [PATCH 4/4] avformat/amr: Fix writing AMR header Andreas Rheinhardt
2022-01-06 12:07 ` [FFmpeg-devel] [PATCH 5/6] fate/amr[nw]b: Add remux tests Andreas Rheinhardt
2022-01-06 12:07 ` [FFmpeg-devel] [PATCH 6/6] fate/amrwb: Fix container type Andreas Rheinhardt
2022-01-06 17:15 ` [FFmpeg-devel] [PATCH 07/10] avformat/Makefile: Add missing alp-muxer->rawenc.o dependency Andreas Rheinhardt
2022-01-06 17:15 ` [FFmpeg-devel] [PATCH 08/10] avformat/Makefile: Add missing amv-muxer->riffenc.o dependency Andreas Rheinhardt
2022-01-07 11:09 ` [FFmpeg-devel] [PATCH v2 08/18] configure: Add missing AMV muxer->riffenc dependency Andreas Rheinhardt
2022-01-06 17:15 ` [FFmpeg-devel] [PATCH 09/10] avformat/Makefile: Fix name of PhotoCD demuxer Andreas Rheinhardt
2022-01-06 17:31 ` Paul B Mahol
2022-01-06 17:15 ` [FFmpeg-devel] [PATCH 10/10] avformat/Makefile: Add entries for CRI, GEM and PGX image pipe demuxers Andreas Rheinhardt
2022-01-06 18:47 ` Andreas Rheinhardt [this message]
2022-01-06 18:47 ` [FFmpeg-devel] [PATCH 12/12] avformat/matroskaenc: Fix build with only WebM muxer enabled Andreas Rheinhardt
2022-01-06 20:07 ` [FFmpeg-devel] [PATCH 13/14] configure: Let decklink indev suggest libzvbi Andreas Rheinhardt
2022-01-07 19:58 ` Marton Balint
2022-01-06 20:07 ` [FFmpeg-devel] [PATCH 14/14] avdevice/iec61883: #if unused code away, fix -O0 compilation Andreas Rheinhardt
2022-01-06 20:51 ` [FFmpeg-devel] [PATCH 15/15] avformat/img2dec: Don't include disabled demuxers Andreas Rheinhardt
2022-01-07 10:53 ` [FFmpeg-devel] [PATCH 16/18] avformat/matroskaenc: Move AAC extradata check to other audio checks Andreas Rheinhardt
2022-01-07 10:53 ` [FFmpeg-devel] [PATCH 17/18] fate/subtitles: Fix check for fate-binsub-mksenc test Andreas Rheinhardt
2022-01-07 10:53 ` [FFmpeg-devel] [PATCH 18/18] avformat/matroskaenc: Disable MKV-only code if MKV muxer is disabled Andreas Rheinhardt
2022-01-08 10:18 ` [FFmpeg-devel] [PATCH] avformat/Makefile: Add missing libamqp->urldecode dependency Andreas Rheinhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AM7PR03MB66602C838D92CCBC59EC85F48F4C9@AM7PR03MB6660.eurprd03.prod.outlook.com \
--to=andreas.rheinhardt@outlook.com \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git