diff --git a/libavcodec/srtenc.c b/libavcodec/srtenc.c index 739645b3bf..d72d338e06 100644 --- a/libavcodec/srtenc.c +++ b/libavcodec/srtenc.c @@ -218,8 +218,11 @@ static void srt_move_cb(void *priv, int x1, int y1, int x2, int y2, static void srt_end_cb(void *priv) { + SRTContext *s = priv; + srt_stack_push_pop(priv, 0, 1); - srt_print(priv, "\r\n\r\n"); + if (s->avctx->codec->id == AV_CODEC_ID_SRT) + srt_print(priv, "\r\n\r\n"); } static const ASSCodesCallbacks srt_callbacks = { diff --git a/tests/ref/fate/sub-subripenc b/tests/ref/fate/sub-subripenc index 7daa4f5533..9666e9baef 100644 --- a/tests/ref/fate/sub-subripenc +++ b/tests/ref/fate/sub-subripenc @@ -1 +1 @@ -bd520f85238abf9df292374aed54681a +b7cb0eeb34af0da364e29b238f0634ae