[FFmpeg-devel] avformat/dashdec: set the parent of represenation

Submitted by Steven Liu on July 10, 2019, 8:34 a.m.

Details

Message ID 20190710083404.87957-1-lq@chinaffmpeg.org
State New
Headers show

Commit Message

Steven Liu July 10, 2019, 8:34 a.m.
and get the current sequence number after refresh playlist

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
---
 libavformat/dashdec.c | 2 ++
 1 file changed, 2 insertions(+)

Patch hide | download patch | download mbox

diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
index 9364718c15..aa9f1726c9 100644
--- a/libavformat/dashdec.c
+++ b/libavformat/dashdec.c
@@ -1065,6 +1065,7 @@  static int parse_manifest_representation(AVFormatContext *s, const char *url,
                     av_log(s, AV_LOG_VERBOSE, "Ignoring invalid frame rate '%s'\n", rep_framerate_val);
             }
 
+            rep->parent = s;
             switch (type) {
                 case AVMEDIA_TYPE_VIDEO:
                     rep->rep_idx = video_rep_idx;
@@ -1614,6 +1615,7 @@  static struct fragment *get_current_fragment(struct representation *pls)
             return seg;
         } else if (c->is_live) {
             refresh_manifest(pls->parent);
+            pls->cur_seq_no = calc_cur_seg_no(pls->parent, pls);
         } else {
             break;
         }