On 09/08/14 18:25, John Stebbins wrote:
> ff_MPV_common_init requires the frame dimensions which gets parsed in
> h261_decode_picture_header.
> ---
> libavcodec/h261dec.c | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/libavcodec/h261dec.c b/libavcodec/h261dec.c
> index dcd7c54..613e1f0 100644
> --- a/libavcodec/h261dec.c
> +++ b/libavcodec/h261dec.c
> @@ -581,12 +581,9 @@ static int h261_decode_frame(AVCodecContext *avctx, void
> *data,
> retry:
> init_get_bits(&s->gb, buf, buf_size * 8);
>
> - if (!s->context_initialized) {
> + if (!s->context_initialized)
> // we need the IDCT permutaton for reading a custom matrix
> ff_idct_common_init(s, s->avctx);
> - if (ff_MPV_common_init(s) < 0)
> - return -1;
> - }
>
> ret = h261_decode_picture_header(h);
>
> @@ -602,6 +599,11 @@ retry:
> ff_MPV_common_end(s);
> s->parse_context = pc;
> }
> +
> + if (!s->context_initialized)
> + if (ff_MPV_common_init(s) < 0)
> + return -1;
if ((ret = ff_MPV_ ...)
return ret;
while at it might be nice.
Seems fine to me.
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel