examples: Fix use of AV_CODEC_FLAG_GLOBAL_HEADER