diff --git a/libavformat/rtpenc_chain.c b/libavformat/rtpenc_chain.c
index f0e4dae8ebc30c7a89c37b34186a711dfb0a428e..b9d1690008d8ee11b9aad35746c63a715f049572 100644
--- a/libavformat/rtpenc_chain.c
+++ b/libavformat/rtpenc_chain.c
@@ -47,6 +47,8 @@ AVFormatContext *ff_rtp_chain_mux_open(AVFormatContext *s, AVStream *st,
         av_free(rtpctx);
         return NULL;
     }
+    /* Pass the interrupt callback on */
+    rtpctx->interrupt_callback = s->interrupt_callback;
     /* Copy the max delay setting; the rtp muxer reads this. */
     rtpctx->max_delay = s->max_delay;
     /* Copy other stream parameters. */
diff --git a/libavformat/sapdec.c b/libavformat/sapdec.c
index 21f893554f3d85d7d5297aa05db92785b729c6a4..7b950cd617d0794dbcdd33671600289976e53e17 100644
--- a/libavformat/sapdec.c
+++ b/libavformat/sapdec.c
@@ -157,6 +157,7 @@ static int sap_read_header(AVFormatContext *s,
     }
     sap->sdp_ctx->max_delay = s->max_delay;
     sap->sdp_ctx->pb        = &sap->sdp_pb;
+    sap->sdp_ctx->interrupt_callback = s->interrupt_callback;
     ret = avformat_open_input(&sap->sdp_ctx, "temp.sdp", infmt, NULL);
     if (ret < 0)
         goto fail;