This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch release/9.0
in repository ffmpeg.

The following commit(s) were added to refs/heads/release/9.0 by this push:
     new a5ef0da32a avformat/dashdec: don't stop at the first input EOF
a5ef0da32a is described below

commit a5ef0da32a0292d7fbe063f9d1065ac5a83b654f
Author:     James Almer <[email protected]>
AuthorDate: Fri Jul 24 11:30:57 2026 -0300
Commit:     James Almer <[email protected]>
CommitDate: Sun Aug 2 00:14:22 2026 -0300

    avformat/dashdec: don't stop at the first input EOF
    
    The current logic would stop demuxing the entire manifest once the first 
Representation
    returned EOF, which could result in plenty of packets from other 
Representations being
    lost.
    
    Signed-off-by: James Almer <[email protected]>
    (cherry picked from commit d9da090b1d05cd731610462fd91c5f167e698909)
---
 libavformat/dashdec.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
index 0ffab1e889..1e6c684b32 100644
--- a/libavformat/dashdec.c
+++ b/libavformat/dashdec.c
@@ -2376,7 +2376,7 @@ static int dash_read_packet(AVFormatContext *s, AVPacket 
*pkt)
     }
 
     if (!cur) {
-        return AVERROR_INVALIDDATA;
+        return AVERROR_EOF;
     }
     while (!ff_check_interrupt(c->interrupt_callback) && !ret) {
         ret = av_read_frame(cur->ctx, pkt);
@@ -2392,9 +2392,17 @@ static int dash_read_packet(AVFormatContext *s, AVPacket 
*pkt)
             cur->is_restart_needed = 0;
             ff_format_io_close(cur->parent, &cur->input);
             ret = reopen_demux_for_component(s, cur);
+        } else if (ret == AVERROR_EOF) {
+            close_demux_for_component(cur);
+            ff_format_io_close(cur->parent, &cur->input);
+            av_log(s, AV_LOG_DEBUG, "EOF on stream_index %d\n", 
cur->stream_index);
+            // prevent recheck_discard_flags() from re-enabling the component
+            for (int i = 0; i < cur->nb_assoc_stream; i++)
+                cur->assoc_stream[i]->discard = AVDISCARD_ALL;
+            return FFERROR_REDO;
         }
     }
-    return AVERROR_EOF;
+    return ret;
 }
 
 static int dash_close(AVFormatContext *s)

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to