[source_avcodec] prevent reading after close