On Fri,  4 Jul 2014 11:21:56 -0400, Vittorio Giovara 
<[email protected]> wrote:
> From: Gildas Cocherel <[email protected]>
> 
> Sample-Id: OPFLAG_B_Qualcomm_1.bit, OPFLAG_C_Qualcomm_1.bit
> Signed-off-by: Vittorio Giovara <[email protected]>
> ---
>  libavcodec/hevc.c      | 2 ++
>  libavcodec/hevc_refs.c | 6 +++++-
>  2 files changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c
> index 95f1c66..e06db62 100644
> --- a/libavcodec/hevc.c
> +++ b/libavcodec/hevc.c
> @@ -545,6 +545,8 @@ static int hls_slice_header(HEVCContext *s)
>              return AVERROR_INVALIDDATA;
>          }
>  
> +        // when flag is not present, picture is inferred to be output
> +        sh->pic_output_flag = 1;
>          if (s->pps->output_flag_present_flag)
>              sh->pic_output_flag = get_bits1(gb);
>  
> diff --git a/libavcodec/hevc_refs.c b/libavcodec/hevc_refs.c
> index 2fbe9e7..c924227 100644
> --- a/libavcodec/hevc_refs.c
> +++ b/libavcodec/hevc_refs.c
> @@ -143,8 +143,12 @@ int ff_hevc_set_new_ref(HEVCContext *s, AVFrame **frame, 
> int poc)
>      *frame = ref->frame;
>      s->ref = ref;
>  
> +    if (s->sh.pic_output_flag)
> +        ref->flags = HEVC_FRAME_FLAG_OUTPUT | HEVC_FRAME_FLAG_SHORT_REF;
> +    else
> +        ref->flags = HEVC_FRAME_FLAG_SHORT_REF;
> +
>      ref->poc      = poc;
> -    ref->flags    = HEVC_FRAME_FLAG_OUTPUT | HEVC_FRAME_FLAG_SHORT_REF;
>      ref->sequence = s->seq_decode;
>      ref->window   = s->sps->output_window;
>  
> -- 
> 1.8.5.2 (Apple Git-48)
> 

I'd use 'implement' instead of 'fix' in the commit message, but w/e.
The patch looks fine.

-- 
Anton Khirnov
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to