does this patch also fix the issue where "decode_slice_header error"
message appear when probing a .ts file [or ts udp stream] which does not
start with an SPS/PPS ?


On Wed, Dec 12, 2012 at 10:30 PM, Janne Grunau <[email protected]>wrote:

> ---
>  libavcodec/h264.c | 15 +++++++--------
>  1 file changed, 7 insertions(+), 8 deletions(-)
>
> diff --git a/libavcodec/h264.c b/libavcodec/h264.c
> index 8847f1f..35cc800 100644
> --- a/libavcodec/h264.c
> +++ b/libavcodec/h264.c
> @@ -4070,17 +4070,16 @@ again:
>                         hx->nal_unit_type, bit_length);
>              }
>
> -            if (context_count == h->max_contexts) {
> -                execute_decode_slices(h, context_count);
> +            if (!err && context_count == h->max_contexts) {
> +                err = execute_decode_slices(h, context_count);
>                  context_count = 0;
>              }
>
> -            if (err < 0) {
> -                av_log(h->s.avctx, AV_LOG_ERROR, "decode_slice_header
> error\n");
> -                if (h->context_reinitialized) {
> -                    buf_index = err;
> -                    goto end;
> -                }
> +            if (err < 0 && (h->setup_finished ||
> h->context_reinitialized)) {
> +                av_log(h->s.avctx, AV_LOG_ERROR, "failed to decode NAL
> %d\n",
> +                       nal_index);
> +                buf_index = err;
> +                goto end;
>              }
>              else if (err == 1) {
>                  /* Slice could not be decoded in parallel mode, copy down
> --
> 1.7.12.4
>
> _______________________________________________
> libav-devel mailing list
> [email protected]
> https://lists.libav.org/mailman/listinfo/libav-devel
>



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

Reply via email to