[MPlayer-dev-eng] [PATCH] fix vo_png
Paul B Mahol
onemda at gmail.com
Tue Feb 14 01:20:19 CET 2012
On 2/13/12, Ivan Kalvachev <ikalvachev at gmail.com> wrote:
> After merging libav changes, ffmpeg no longer works with vo_png.
>
> The problem is that avcodec_open2() function now wants a valid pix_fmt
> to be set in avctx, but the current vo_png opens the encoder in
> preinit() function, long before the exact pixel format
> (RGB8/15/16/24/32) is known.
>
> To fix this I've moved the avcodec_open2() function to
> vo_png::config() and added a check for changed pixel format in case of
> second call to config() without uninit() (this is valid behavior).
>
>
> Please check the patch, I want to commit it soon.
>
Reopening codec when pix_fmt changes should not be needed.
Just adding fake but valid pix_fmt supported by png encoder should be
enough before
calling avcodec_open2().
More information about the MPlayer-dev-eng
mailing list