ffmpeg: simplify mid-stream reconfiguration when libavfilter is disabled
authorStefano Sabatini <stefano.sabatini-lala@poste.it>
Mon, 2 May 2011 07:35:38 +0000 (09:35 +0200)
committerStefano Sabatini <stefano.sabatini-lala@poste.it>
Sat, 7 May 2011 10:03:58 +0000 (12:03 +0200)
commitf5a669c229425cdac828c230addf10d6d9cbe3a7
tree1b5316ff693492059237401d0b7013851e227dcf
parent566666caf3a09d6254edaa99d222eddb6fe2986b
ffmpeg: simplify mid-stream reconfiguration when libavfilter is disabled

Implement lazy initialization of the image resample context, so that
the initialization code does not need to be duplicated.

Also manage the case in which resample/size change mid-stream. For
each packet the code computes if resampling is needed.

Previously the resample check was done only at the initialization, in
case size/format changed and no resample was detected at the init
stage ffmpeg was silently exiting.
ffmpeg.c