ffmpeg | branch: master | jiangjie <jiangjie...@gmail.com> | Mon Sep  2 
16:16:05 2024 +0800| [f606872ed0e2224c6809870c2116273f768a80b0] | committer: 
Steven Liu

avformat/dashdec: The segments in dash file doesn't read completely when 
segment's size and duration is very small.

If the segment is very small, avformat_find_stream_info
will read all audio/video data in this segment.
cur->is_restart_needed is set to 0 later in dash_read_packet,
and no chance to be set to 1 again in the read_data function.

Reproduction:
ffmpeg -f lavfi -i mandelbrot -f lavfi -i anullsrc -c:v vp8 \
 -g 5 -r 5 -c:a libopus -use_template 0 -seg_duration 1 \
 -t 15 -y test_720.mpd
ffprobe -show_packets test_720.mpd

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f606872ed0e2224c6809870c2116273f768a80b0
---

 libavformat/dashdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
index 555e21bf69..99ac6197be 100644
--- a/libavformat/dashdec.c
+++ b/libavformat/dashdec.c
@@ -2208,9 +2208,9 @@ static int dash_read_packet(AVFormatContext *s, AVPacket 
*pkt)
         if (cur->is_restart_needed) {
             cur->cur_seg_offset = 0;
             cur->init_sec_buf_read_offset = 0;
+            cur->is_restart_needed = 0;
             ff_format_io_close(cur->parent, &cur->input);
             ret = reopen_demux_for_component(s, cur);
-            cur->is_restart_needed = 0;
         }
     }
     return AVERROR_EOF;

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to