On Fri, Dec 23, 2011 at 05:06:10AM +0200, KJT TOD wrote:
> 
> --- a/libavcodec/mpegvideo.c
> +++ b/libavcodec/mpegvideo.c
> @@ -1002,14 +1008,14 @@ void MPV_common_end(MpegEncContext *s)
>  
> -void init_rl(RLTable *rl,
> +void init_rl(RLTable *rl, 
>               uint8_t static_store[2][2 * MAX_RUN + MAX_LEVEL + 3])
>  {
> @@ -1100,7 +1106,7 @@ void ff_release_unused_pictures(MpegEncContext*s, int 
> remove_current)
>  
>      for (i = 0; i < s->picture_count; i++) {
> -        if (s->picture[i].f.data[0] && !s->picture[i].f.reference &&
> +        if (s->picture[i].f.data[0] && !s->picture[i].f.reference && 
>              (!s->picture[i].owner2 || s->picture[i].owner2 == s) &&
> @@ -1109,7 +1115,7 @@ void ff_release_unused_pictures(MpegEncContext*s, int 
> remove_current)
>  
> -int ff_find_unused_picture(MpegEncContext *s, int shared)
> +int ff_find_unused_picture(MpegEncContext *s, int shared) 
>  {

Trailing whitespace added.

> @@ -1129,28 +1135,46 @@ int ff_find_unused_picture(MpegEncContext *s, int 
> shared)
>  
> -    return AVERROR_INVALIDDATA;
> +    av_log(s->avctx, AV_LOG_FATAL, 
> +           "Internal error, picture buffer overflow\n");
> +    /* We could return -1, but the codec would crash trying to draw into a
> +     * non-existing frame anyway. This is safer than waiting for a random 
> crash.
> +     * Also the return of this is never useful, an encoder must only allocate
> +     * as much as allowed in the specification. This has no relationship to 
> how
> +     * much libavcodec could allocate (and MAX_PICTURE_COUNT is always large
> +     * enough for such valid streams).
> +     * Plus, a decoder has to check stream validity and remove frames if too
> +     * many reference frames are around. Waiting for "OOM" is not correct at
> +     * all. Similarly, missing reference frames have to be replaced by
> +     * interpolated/MC frames, anything else is a bug in the codec ... */
> +    abort();
> +    return -1;

This must be a merge accident or so.


Please review your own patches before sending them.  Also look at

  git log -p -w

to make sure you did not add accidental changes.

Once again your patch does not apply:

~/src/priv/libav $ patch --dry-run -p1 -i 
0001-Mpegvideo-K-R-formatting-cosmetics.patch 
patching file libavcodec/mpegvideo.c
patch: **** unexpected end of file in patch

I still suspect your mailer.  Please set up git-send-email already and/or
throw away that mailer of yours.

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

Reply via email to