summaryrefslogtreecommitdiffstats
path: root/libavformat/dashdec.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <[email protected]>2020-09-18 23:50:53 +0200
committerAndreas Rheinhardt <[email protected]>2021-02-27 07:20:59 +0100
commit9ec9fc351e667b108b5b5bafab04152b4a47638c (patch)
tree96827724a8e17b4d5f0427a3836ee67128f49ab6 /libavformat/dashdec.c
parentc0aa40d3344670a65f159121afbac01ae4ebe92f (diff)
avformat/dashdec: Remove dead code
The code in question seems to have been copied from about 70 lines above; yet the code here is only executed if some of the variables (namely representation_segmenttemplate_node and fragment_template_node) are NULL, so it makes no sense to check them for a child element. Also remove a redundant resetting of a pointer to an AVFormatContext after avformat_close_input() (which already sets the pointer to NULL). Reviewed-by: Steven Liu <[email protected]> Signed-off-by: Andreas Rheinhardt <[email protected]> (cherry picked from commit 248ef276beb8222bc2610484b830420e1a306d8b)
Diffstat (limited to 'libavformat/dashdec.c')
-rw-r--r--libavformat/dashdec.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
index c785b81268..5180ba1786 100644
--- a/libavformat/dashdec.c
+++ b/libavformat/dashdec.c
@@ -1047,12 +1047,7 @@ static int parse_manifest_representation(AVFormatContext *s, const char *url,
fragmenturl_node = xmlNextElementSibling(fragmenturl_node);
}
- fragment_timeline_node = find_child_node_by_name(representation_segmenttemplate_node, "SegmentTimeline");
-
- if (!fragment_timeline_node)
- fragment_timeline_node = find_child_node_by_name(fragment_template_node, "SegmentTimeline");
- if (!fragment_timeline_node)
- fragment_timeline_node = find_child_node_by_name(adaptionset_segmentlist_node, "SegmentTimeline");
+ fragment_timeline_node = find_child_node_by_name(adaptionset_segmentlist_node, "SegmentTimeline");
if (!fragment_timeline_node)
fragment_timeline_node = find_child_node_by_name(period_segmentlist_node, "SegmentTimeline");
if (fragment_timeline_node) {
@@ -1896,7 +1891,6 @@ static void close_demux_for_component(struct representation *pls)
memset(&pls->pb, 0x00, sizeof(AVIOContext));
pls->ctx->pb = NULL;
avformat_close_input(&pls->ctx);
- pls->ctx = NULL;
}
static int reopen_demux_for_component(AVFormatContext *s, struct representation *pls)