avcodec/decode: flush the internal bsfs instead of constantly reinitalizing them

Initialize the bsfs once when opening the codec and uninitialize them once when
closing it, instead of at every codec flush/seek.

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer
2018-07-26 20:42:27 -03:00
parent 2954e51393
commit 94fe138de0
3 changed files with 19 additions and 10 deletions

View File

@@ -64,6 +64,8 @@ typedef struct FrameDecodeData {
*/
int ff_decode_get_packet(AVCodecContext *avctx, AVPacket *pkt);
int ff_decode_bsfs_init(AVCodecContext *avctx);
void ff_decode_bsfs_uninit(AVCodecContext *avctx);
/**