lavf: Use av_codec_get_tag2() in avformat_query_codec().
av_codec_get_tag() can return 0 both in case of error and success.