diff mbox series

[FFmpeg-devel,v2,1/6] avformat/mux: Remove assert based on faulty assumptions

Message ID AM7PR03MB6660033A965D169EF902724E8F599@AM7PR03MB6660.eurprd03.prod.outlook.com
State Accepted
Headers show
Series [FFmpeg-devel,v2,1/6] avformat/mux: Remove assert based on faulty assumptions | expand

Checks

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
andriy/make_aarch64_jetson success Make finished
andriy/make_fate_aarch64_jetson success Make fate finished

Commit Message

Andreas Rheinhardt Jan. 19, 2022, 9:19 p.m. UTC
This assert is based upon the wrong assumption that
the noninterleaved codepath is never used; if it is used,
max_interleave_delta is irrelevant. It furthermore
ignores audio_preload.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavformat/mux.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Andreas Rheinhardt Jan. 21, 2022, 12:14 p.m. UTC | #1
Andreas Rheinhardt:
> This assert is based upon the wrong assumption that
> the noninterleaved codepath is never used; if it is used,
> max_interleave_delta is irrelevant. It furthermore
> ignores audio_preload.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> ---
>  libavformat/mux.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/libavformat/mux.c b/libavformat/mux.c
> index c387f8ec6e..e34fd88f05 100644
> --- a/libavformat/mux.c
> +++ b/libavformat/mux.c
> @@ -697,7 +697,6 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt)
>                  );
>              }
>          } else {
> -            av_assert2(pkt->dts == AV_NOPTS_VALUE || pkt->dts >= 0 || s->max_interleave_delta > 0);
>              if (pkt->dts != AV_NOPTS_VALUE && pkt->dts < 0) {
>                  av_log(s, AV_LOG_WARNING,
>                      "Packets poorly interleaved, failed to avoid negative "
> 

Will apply this patchset tomorrow unless there are objections.

- Andreas
diff mbox series

Patch

diff --git a/libavformat/mux.c b/libavformat/mux.c
index c387f8ec6e..e34fd88f05 100644
--- a/libavformat/mux.c
+++ b/libavformat/mux.c
@@ -697,7 +697,6 @@  static int write_packet(AVFormatContext *s, AVPacket *pkt)
                 );
             }
         } else {
-            av_assert2(pkt->dts == AV_NOPTS_VALUE || pkt->dts >= 0 || s->max_interleave_delta > 0);
             if (pkt->dts != AV_NOPTS_VALUE && pkt->dts < 0) {
                 av_log(s, AV_LOG_WARNING,
                     "Packets poorly interleaved, failed to avoid negative "