[FFmpeg-devel,V1,1/2] lavf/hls: Remove HLSContext.strict_std_compliance field

Submitted by Jun Zhao on April 16, 2019, 5:57 a.m.

Details

Message ID 1555394232-29837-1-git-send-email-mypopydev@gmail.com
State Accepted
Commit d6489ddb7a6cdfb6bd4e5b8095d765e0ba1aba4a
Headers show

Commit Message

Jun Zhao April 16, 2019, 5:57 a.m.
From: Jun Zhao <barryjzhao@tencent.com>

After the commit 9f61abc8111, we can use AVFormatContext.strict_std_compliance
instead of HLSContext.strict_std_compliance to avoid the code redundancy.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
---
 libavformat/hls.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

Comments

mypopy@gmail.com April 28, 2019, 2:03 a.m.
On Tue, Apr 16, 2019 at 2:04 PM Jun Zhao <mypopydev@gmail.com> wrote:
>
> From: Jun Zhao <barryjzhao@tencent.com>
>
> After the commit 9f61abc8111, we can use AVFormatContext.strict_std_compliance
> instead of HLSContext.strict_std_compliance to avoid the code redundancy.
>
> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
> ---
>  libavformat/hls.c |    4 +---
>  1 files changed, 1 insertions(+), 3 deletions(-)
>
> diff --git a/libavformat/hls.c b/libavformat/hls.c
> index 1b61b4b..19ea88e 100644
> --- a/libavformat/hls.c
> +++ b/libavformat/hls.c
> @@ -203,7 +203,6 @@ typedef struct HLSContext {
>      int64_t cur_timestamp;
>      AVIOInterruptCB *interrupt_callback;
>      AVDictionary *avio_opts;
> -    int strict_std_compliance;
>      char *allowed_extensions;
>      int max_reload;
>      int http_persistent;
> @@ -485,7 +484,7 @@ static struct rendition *new_rendition(HLSContext *c, struct rendition_info *inf
>          return NULL;
>
>      /* TODO: handle subtitles (each segment has to parsed separately) */
> -    if (c->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL)
> +    if (c->ctx->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL)
>          if (type == AVMEDIA_TYPE_SUBTITLE)
>              return NULL;
>
> @@ -1786,7 +1785,6 @@ static int hls_read_header(AVFormatContext *s)
>
>      c->ctx                = s;
>      c->interrupt_callback = &s->interrupt_callback;
> -    c->strict_std_compliance = s->strict_std_compliance;
>
>      c->first_packet = 1;
>      c->first_timestamp = AV_NOPTS_VALUE;
> --
> 1.7.1
>
Pushed, Thanks

Patch hide | download patch | download mbox

diff --git a/libavformat/hls.c b/libavformat/hls.c
index 1b61b4b..19ea88e 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -203,7 +203,6 @@  typedef struct HLSContext {
     int64_t cur_timestamp;
     AVIOInterruptCB *interrupt_callback;
     AVDictionary *avio_opts;
-    int strict_std_compliance;
     char *allowed_extensions;
     int max_reload;
     int http_persistent;
@@ -485,7 +484,7 @@  static struct rendition *new_rendition(HLSContext *c, struct rendition_info *inf
         return NULL;
 
     /* TODO: handle subtitles (each segment has to parsed separately) */
-    if (c->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL)
+    if (c->ctx->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL)
         if (type == AVMEDIA_TYPE_SUBTITLE)
             return NULL;
 
@@ -1786,7 +1785,6 @@  static int hls_read_header(AVFormatContext *s)
 
     c->ctx                = s;
     c->interrupt_callback = &s->interrupt_callback;
-    c->strict_std_compliance = s->strict_std_compliance;
 
     c->first_packet = 1;
     c->first_timestamp = AV_NOPTS_VALUE;